Image Calculator: OR

From MIPAV
Revision as of 15:57, 15 February 2012 by Angelfish100 (Talk)

(diff) <previousrevision> | Latest revision (diff) | <nextrevision> (diff)
Jump to: navigation, search

OR

If the pixel value from a chosen pixel in Image A equals zero, then the result pixel value is set equal to the corresponding Image B pixel value. Otherwise, the result pixel value is the same as for the Image A (i.e. stays unchanged).

Result=Image B, if Image A=0;
otherwise, Result=Image A.
Figure 251. OR(Image A; Image B)


{| align="center"

AndImageA.jpg



|


{| align="center"

| AndImageB.jpg

|}

|


{| align="center"

| ORImageAImageB.jpg

|}

|- |

Image A

|

Image B

|

(Image A OR Image B)

|}


XOR

It overlays two images together, but then clears the area that is overlapped back to transparency. If both Image A and Image B pixel values are nonzero, then the result image is set to zero. If both Image A and Image B pixel values are zero, then the result image remains zero. If only one of Image A and Image B is nonzero, then the result retains or assumes the nonzero value.

Figure 252. XOR(Image A; Image B)


{| align="center"

AndImageA.jpg



|


{| align="center"

| XORImageB.jpg

|}

|


{| align="center"

| XORIMageAImageB.jpg

|}

|- |

Image A

|

Image B

|

(Image A XOR Image B)

|}


Subtract

Subtracts the pixel values of Image B from the corresponding pixel values of Image A.

Figure 253. Subtract(Image A; Image B)


{| align="center"

AndImageA.jpg



|


{| align="center"

| XORImageB.jpg

|}

|


{| align="center"

| SubtractImageBImageA.jpg

|}

|- |

Image A

|

Image B

|

Image A-Image B

|}

1.2