Specifications
Histogram, Threshold, and Compare Functions
10-13
10
Greater
Tests if the pixel values of the
first image are greater than
those of the second image.
IPLStatus iplGreater (IplImage*
img1, IplImage* img2
,
IplImage*
dst
);
img1, img2
The source images.
dst
The resultant 1-bit image.
Discussion
The function iplGreater() compares the corresponding pixels of two
input images for “greater than” and writes the results to a 1-bit image
dst
.
If a pixel’s value in
img1
is greater than that pixel’s value in
img2
, then the
corresponding pixel in
dst
is set to 1; otherwise the pixel in
dst
is set to 0.
The images
img1
and
img2
must have the same bit depth, origin, and COI
settings. If the COI is not set, an
img1
pixel is considered to be “greater”
than an
img2
pixel only if each channel in the
img1
pixel is greater than
that channel in the
img2
pixel. If the COI is set, the function compares only
the COI values.
The function returns
IPL_StsOK if the compare operation is successful.
If you pass incompatible
img1
and
img2
or a null pointer, the function does
not perform the compare operation and returns an error status code.