How to see only differences #7300
Replies: 1 comment 1 reply
-
Suppose your images have three channels: red, green and blue. On a scale of 0 to 255, a "red" pixel has channel values (255,0,0), and "yellow" pixels are (255,255,0). A "difference" composite is the absolute values in each channel of one pixel minus the other. So the "difference" between red and yellow is: (255-255, 255-0, 0-0) = (0,255,0), which is green. Note that the difference between two identical colour is black. In your input images, suppose you have only black and white pixels. So we have four combinations of inputs, each with a desired output.
There are many ways to do this. One is to make the new image where the red channel comes from img1, and the green and blue channels from img2. This will give:
Then we can change black to orange with " Windows BAT command (untested):
If you need further help, please post sample inputs. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to draw with graphite pencils, so only black color is used. At this moment I have the habbit to scan the result of my drawing in different stages.
I'v already used the imagick program to align the different scans and to process different images, but i don't succeed to have only the differences. I always get also the common parts.
Let me explain more in detail. (Mostly I work in powershell)
Lets say i'v 2 stages saved in files $f1 and $f2
I'm using the next instructions
$f4 = "test4.jpg"
magick.exe $f1 -fill yellow +opaque white $f4
$f5 = "test5.jpg"
magick.exe $f2 -fill red +opaque white $f5
magick.exe composite $f4 $f5 -compose difference difference_jpeg.gif
I hoped the drawing in the first stage was converted from black to yellow,
I hoped the drawing in the second stage was converted to a red drawing
I hoped that by composing the difference a would get a third drawing with
Thanks in advance for any idea's.
Eddy
Beta Was this translation helpful? Give feedback.
All reactions