mediaLib Library Functions mlibImageThresh1Fp(3MLIB)
NAME
mlibImageThresh1Fp - image thresholding
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include
mlibstatus mlibImageThresh1Fp(mlibimage *dst, const mlibimage *src,
const mlibd64 *thresh, const mlibd64 *ghigh, const mlibd64 *glow);
DESCRIPTION
The mlibImageThresh1Fp() function compares each pixel in
the floating-point source image to a threshold value. If the
pixel is less than or equal to the threshold value, then the
destination pixel is set to the low output level. If the
pixel is greater than the threshold value, then the destina-
tion pixel is set to the high output level.
The data type of the destination image can be MLIBIT or
can be the same as the data type of the source image.
It uses the following equation:
dst[x][y][i] = glow[i] if src[x][y][i] < thresh[i]
dst[x][y][i] = ghigh[i] if src[x][y][i] > thresh[i]
PARAMETERS
The function takes the following arguments:
dst Pointer to destination image.
src Pointer to source image.
thresh Threshold value. thresh[i] contains the threshold
for channel i.
ghigh High output level. ghigh[i] contains the high out-
put level for channel i.
glow Low output level. glow[i] contains the low output
level for channel i.
SunOS 5.11 Last change: 2 Mar 2007 1
mediaLib Library Functions mlibImageThresh1Fp(3MLIB)
RETURN VALUES
The function returns MLIBSUCES if successful. Otherwise
it returns MLIBFAILURE.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
SEE ALSO
mlibImageThresh1(3MLIB), mlibImageThresh1FpInp(3MLIB),
mlibImageThresh1Inp(3MLIB), mlibImageThresh2(3MLIB),
mlibImageThresh2Fp(3MLIB),
mlibImageThresh2FpInp(3MLIB),
mlibImageThresh2Inp(3MLIB), mlibImageThresh3(3MLIB),
mlibImageThresh3Fp(3MLIB),
mlibImageThresh3FpInp(3MLIB),
mlibImageThresh3Inp(3MLIB), mlibImageThresh4(3MLIB),
mlibImageThresh4Fp(3MLIB),
mlibImageThresh4FpInp(3MLIB),
mlibImageThresh4Inp(3MLIB), mlibImageThresh5(3MLIB),
mlibImageThresh5Fp(3MLIB),
mlibImageThresh5FpInp(3MLIB),
mlibImageThresh5Inp(3MLIB), attributes(5)
SunOS 5.11 Last change: 2 Mar 2007 2
|