Horus Doc || Global Function Guide || General documentation   | Function documentation  

HxSup

Synopsis

HxImageRep HxSup(HxImageRep im1, HxImageRep im2)

Input

HxImageRep im1
The first input image

HxImageRep im2
The second input image

Return value

HxImageRep
The pixelwise supremum of the input images

Description

The function HxSup takes the supremum of two images on a pixel-by-pixel basis. The supremum of two vector values of equal dimensionality is defined as the component wise supremum resulting in a vector with the same dimensionality. The supremum of pixel types with different dimensionalities cannot be taken.

Remarks

Admissable image types
The two input images should have the same dimensionality, the same pixeldimensionality and the same size.

Examples

Taking the pixelwise supremum of two images

#include "HxImageRepGlobalFuncs.h"
#include "HxImageRep.h"

HxImageRep HxSupExample1(HxImageRep im1, HxImageRep im2) {
   im1 = HxSup(im1, im2);

   return im1;
}

int main(int argc, char* argv[])
{
    HxImageRep im1 = HxMakeFromFile(argv[1]);
    HxImageRep im2 = HxMakeFromFile(argv[2]);
    im1 = HxSupExample1(im1, im2);
    HxWriteFile(im1, argv[3]);

    return 0;
}

exampleImage1.gif

First input image for the HxSup example.

exampleImage2.gif

Second input image for the HxSup example.

HxSupResult1.gif

Output image of the HxSup example.

In this example take the supremum of two (scalar) images.

See also

HxMax, HxMin, HxInf,

Keywords

Binary, Arithmetic,


Generated on Mon Jan 27 15:45:02 2003 for GlobalFunctionGuide by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001