Searching for a way to do Bitwise XOR on images

前端 未结 6 1638
Happy的楠姐
Happy的楠姐 2021-01-31 09:42

I am looking for a way to get the Bitwise XOR of two images on the command line(or in another way that can be implemented in a program or script).

This should result in

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-31 10:24

    Knowing that

    A XOR B = (A AND NOT B) OR (NOT A AND B).

    and that most of common image processing tools do have and, or and not operations the rest is quite easy :)

    Working in Python, you could have a simple script performing the operation and even adding it as a plugin in the gimp ;)

提交回复
热议问题