• and(M, N)—Returns the Boolean AND of the two image matrices M and N, which must be the same size.
• or(M, N)—Returns the Boolean OR of the two image matrices M and N, which must be the same size.
Arguments
• M, N are image matrices.
Additional Information
• You can use the and and or functions to find features in color images, by thresholding the three colors (RGB) separately, and ANDing or ORing the three binary images.
• The and function returns zero if either of the two corresponding pixels in the images is zero, and returns 255 if they are both 255.
• The or function returns zero if both of the two corresponding pixels in the images is zero, and returns 255 otherwise.
• Nonbinary image inputs to and find the minimum of the two images on a pixel-by-pixel basis; likewise, or finds the maximum.