Synopsis
HxImageRep HxTanh (HxImageRep img)
Input
HxImageRep img
Return value
HxImageRep
Description
This function takes the hyperbolic tangent of every pixel value of the input image. For vector images, the hyperbolic tangent of every element of the vector is taken.
Remarks
Examples
Taking the hyperbolic tangent of an image.
#include "HxImageRepGlobalFuncs.h" #include "HxImageRep.h" HxImageRep HxTanhExample1(HxImageRep img) { img = HxImageAsDouble(img); img = HxContrastStretch(img, 4.0); img = HxAddVal(img, -2.0); img = HxTanh(img); img = HxContrastStretch(img, 255.0); img = HxImageAsByte(img); return img; } int main(int argc, char* argv[]) { HxImageRep im1 = HxMakeFromFile(argv[1]); im1 = HxTanhExample1(im1); HxWriteFile(im1, argv[2]); return 0; }
Input image for the HxTanh example.
Output image of the HxTanh example.
This example illustrates the result of taking the hyperbolic tangent of an image.
See also
Keywords
Unary, Trigonometric,