mediaLib Library Functions mlibImageSobel(3MLIB)
NAME
mlibImageSobel, mlibImageSobelFp - Sobel filter
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include
mlibstatus mlibImageSobel(mlibimage *dst, const mlibimage *src,
mlibs32 cmask, mlibedge edge);
mlibstatus mlibImageSobelFp(mlibimage *dst, const mlibimage *src,
mlibs32 cmask, mlibedge edge);
DESCRIPTION
Each function is a special case of the gradient filter,
which is an edge detector which computes the magnitude of
the image gradient vector in two orthogonal directions. In
this case, the gradient filter uses specific horizontal and
vertical masks.
The Sobel filter is one of the special cases of gradient
filter using the following horizontal and vertical masks:
hmask = { -1.0, 0.0, 1.0,
-2.0, 0.0, 2.0,
-1.0, 0.0, 1.0 }
vmask = { -1.0, -2.0, -1.0,
0.0, 0.0, 0.0,
1.0, 2.0, 1.0 }
PARAMETERS
Each function takes the following arguments:
dst Pointer to destination image.
src Pointer to source image.
cmask Channel mask to indicate the channels to be pro-
cessed, each bit of which represents a channel in
the image. The channels corresponding to 1 bits are
those to be processed. For a single channel image,
the channel mask is ignored.
SunOS 5.11 Last change: 2 Mar 2007 1
mediaLib Library Functions mlibImageSobel(3MLIB)
edge Type of edge condition. It can be one of the fol-
lowing:
MLIBEDGEDSTNOWRITE
MLIBEDGEDSFILZERO
MLIBEDGEDSTCOPYSRC
MLIBEDGESREXTEND
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
mlibImageGradient3x3(3MLIB),
mlibImageGradient3x3Fp(3MLIB), attributes(5)
SunOS 5.11 Last change: 2 Mar 2007 2
|