| <<< Home | << Web | < Arithmetic | Top | Bottom | < Prev | Next > |
We've seen a lot of examples now of how individual colors are added. But understanding this really doesn't prepare you very well for actually using arithmetic. A 100x100 image contains 10,000 pixels, so adding two 100x100 images requires a lot of arithmetic. Even if you have a feel for what's happening on an individual pixel, it's hard to grasp what the result of adding two images is really going to be. This is something you can start building a feel for with some experience, but I'm still at a state where I take an educated guess what a result might look like and then use trial and error with the various options to try to get what I'm after.
As a general rule, two very busy pictures don't work very well together. For this example, I've chosen a couple of busy pictures. I didn't expect them to combine very well, and I was right. But you can never be sure until you try (at least I can't sometimes pictures that I didn't expect to combine well have made very interesting results). These didn't combine well, but I found that they did illustrate the add function and its pitfalls fairly well.
Here are the two images:
Original #1
Original #2
Add d=1,bias 0
An add with divisor 1 is usually much too light. Here, there is a lot of white due to clipping. Either a divisor of 2 or a negative bias could be used to darken the image up.
Original #1
Original #2
Add d=1,Bias 0
Add d=1, Bias -100
Here we've darkened up the clipped divisor=1 addition by using a negative bias. The result is still a jumbled mess, but the colors are much nicer.
Original #1
Original #2
Add d=1,bias 0
Add d=1,bias -100
Add d=2,bias 0
Here, a divisor of 2 darkens the result. Since the bias is 0, all results are 0-255. Clipping is not needed. This is the equivalent of the "average" function.
Original #1
Original #2
Add d=1,bias 0
Add d=1,bias -100
Add d=2,bias 0
Add d=3,bias 0
A divisor of 3 makes the picture way too dark. Since the largest value after adding is 510, the largest value after dividing by 3 is 170, so a lot of the lighter colors have no chance of showing up. You'll almost never want to use a divisor larger than 2 when using add.
Original #1
Original #2
Add Unclipped
Unclipped, many colors "wrap around" from 255 to 0. Unclipped addition rarely gives good results.
| <<< Home | << Web | < Arithmetic | Top | Bottom | < Prev | Next > |