<<< Home << Web < Arithmetic Top Bottom < Prev Next >

Image Arithmetic
Subtract/Difference Example

Original #16, 7k

Recognize this building? Let's see what we can do with this picture.

Original #6, 5k Here's a nice picture. Let's see how the two of them combine. Both images have a lot of black, but it's important to note that very little of this black is (0,0,0). Both images have a lot of area with values such as (1,1,0) or (4,4,4) — these do not behave like (0,0,0)!




Subtract — divisor 1 bias 0

Subtract
Original #1
Original #2
Subtract

Remember that (black - x) equals black when you use clipping. And the bottom part of the dome stayed intact since (x - black) equals x.




Subtract — divisor 1 bias 50

Subtract
Original #1
Original #2
Subtract — Bias 0
Subtract — Bias 50

Positive bias lightens the image a bit, and picks up a bit more detail from the second original image.




Subtract — Images reversed

Subtract
Original #1
Original #2
#1 - #2 — Bias 0
#1 - #2 — Bias 50
#2 - #1 — Bias 0

Subtraction gives a very different result when you switch which image is subtracted from which. The bottom area stayed black - remember that (black - x) equals black when you use clipping.




Difference

Difference
Original #1
Original #2
#1 - #2 — Bias 0
#1 - #2 — Bias 50
#2 - #1 — Bias 0
Difference — Bias 0

This is the difference function applied to these two images.




Unclipped Subtraction

Difference
Original #1
Original #2
#1 - #2 — Clipped
#1 - #2 — Unclipped

Letting the colors wrap around gives quite a different result. Why did black - black give red? Because it's not completely (0,0,0) black. Near the bottom one image has a lot of (1,0,0) and the other has a lot of (4,0,0) — giving a result of (253,0,0) red when unclipped.




Unclipped Subtraction — Images Reversed

Difference
Original #1
Original #2
#1 - #2 — Unclipped
#2 - #1 — Clipped
#2 - #1 — Unclipped

Again, you get a very different result when you switch which image is subtracted from which.




???

Difference
Original #1
Original #2
???

??!? I don't know what happened here. Seems like something is missing, but I can't quite put my finger on it.


<<< Home << Web < Arithmetic Top Bottom < Prev Next >