ImageDiff

Author : Melanie Rhianna Lewis
Input Type : TrianaPixelMap
Output Type : TrianaPixelMap
Date :

ImageDiff is a binary operator. A binary operator is one which takes data from two images and generates a third image. It does this by taking the value of the corresponding pixels in each of the two input images and combining the values using some operator to generate the apropriate pixel in the third image. Both input images must have the same dimensions.

ImageDiff finds the absolute difference between the red values, green values and blue values for the two input images and generates a new image. Mathematically it can be expressed as follows:


    rr(i, j) = abs(r1(i, j) - r2(i, j))
    gr(i, j) = abs(g1(i, j) - g2(i, j))
    br(i, J) = abs(b1(i, j) - b2(i, j))
For an example of this unit in action please see ShrinkWhite.

See also

ImageAdd, ImageAnd, ImageOr, ImageXor