Synopsis
HxImageRep HxTan (HxImageRep img)
Input
HxImageRep img
Return value
HxImageRep
Description
This function takes the tangent of every pixel value of the input image. For vector images, the tangent of every element of the vector is taken. Note that the tangent is not defined for number where k is an integer.
Remarks
Examples
Taking the tangent of an image.
#include "HxImageRepGlobalFuncs.h" #include "HxImageRep.h" HxImageRep HxTanExample1(HxImageRep img) { img = HxImageAsDouble(img); img = HxContrastStretch(img, 3.0); img = HxSubVal(img, 1.5); img = HxTan(img); img = HxContrastStretch(img, 255.0); img = HxImageAsByte(img); return img; } int main(int argc, char* argv[]) { HxImageRep img = HxMakeFromFile(argv[1]); img = HxTanExample1(img); HxWriteFile(img, argv[2]); return 0; }
Input image for the HxTan example.
Output image of the HxTan example.
This example illustrates the result of taking the tangent of an image
See also
Keywords
Unary, Trigonometric,