Page 1 of 1

Get absolute color difference between two imags.

Posted: 2017-07-09T13:26:26-07:00
by coolperez8
So, let's say I have 2 images. Both are identical, except one has a semi-transparent overlay placed over it. What I want to do is convert both images to greyscale, and render an output image which has values that are the absolute difference between the two input images. Also, How can I extract a semi-transparent overlay from an image, assuming it has the same opacity?

Re: Get absolute color difference between two imags.

Posted: 2017-07-09T13:35:29-07:00
by snibgo
coolperez8 wrote:What I want to do is convert both images to greyscale, and render an output image which has values that are the absolute difference between the two input images.

Code: Select all

code in1.png in2.png -colorspace Gray -compose Difference -composite out.png
coolperez8 wrote:Also, How can I extract a semi-transparent overlay from an image, assuming it has the same opacity?
I think of this as a de-watermarking problem. See Watermarks.

Re: Get absolute color difference between two imags.

Posted: 2017-07-09T13:56:03-07:00
by coolperez8
snibgo wrote: 2017-07-09T13:35:29-07:00
coolperez8 wrote:What I want to do is convert both images to greyscale, and render an output image which has values that are the absolute difference between the two input images.

Code: Select all

code in1.png in2.png -colorspace Gray -compose Difference -composite out.png
coolperez8 wrote:Also, How can I extract a semi-transparent overlay from an image, assuming it has the same opacity?
I think of this as a de-watermarking problem. See Watermarks.
How would I use the scripts? I have a Windows 10 PC as well as a PC running Linux Mint 18.

Re: Get absolute color difference between two imags.

Posted: 2017-07-09T14:05:18-07:00
by snibgo
The scripts and commands are Windows BAT syntax. Example commands on the page show commands that use the script. They are simple, and could easily be converted to bash or any script language.