Synopsis
HxImageRep HxOr(HxImageRep im1, HxImageRep im2)
Input
HxImageRep im1
HxImageRep im2
Return value
HxImageRep
Description
The function HxOr takes the logical `or' of corresponding pixels in the two images. The `or' of two vectors is taken component wise.
Remarks
Examples
Taking the logical `or'
#include "HxImageRepGlobalFuncs.h"
#include "HxImageRep.h"
HxImageRep HxOrExample1(HxImageRep im1, HxImageRep im2) {
im1 = HxImageAsDouble(im1);
im2 = HxImageAsDouble(im2);
im1 = HxContrastStretch(im1, 1.0);
im2 = HxContrastStretch(im2, 1.0);
im1 = HxImageAsByte(im1);
im2 = HxImageAsByte(im2);
im1 = HxOr(im1, im2);
im1 = HxContrastStretch(im1, 255);
return im1;
}
int main(int argc, char* argv[])
{
HxImageRep im1 = HxMakeFromFile(argv[1]);
HxImageRep im2 = HxMakeFromFile(argv[2]);
im1 = HxOrExample1(im1, im2);
HxWriteFile(im1, argv[3]);
return 0;
}
First input image for the HxOr example.
Second input image for the HxOr example.
Output image of the HxOr example.
In this example we take the logical `or' of the two input images.
See also
Keywords
Binary, Logical,
1.2.12 written by Dimitri van Heesch,
© 1997-2001