'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_ImageSobel 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_ImageSobel, mlib_ImageSobel_Fp \- Sobel filter .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_status\fR \fBmlib_ImageSobel\fR(\fBmlib_image *\fR\fIdst\fR, \fBconst mlib_image *\fR\fIsrc\fR, \fBmlib_s32\fR \fIcmask\fR, \fBmlib_edge\fR \fIedge\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_ImageSobel_Fp\fR(\fBmlib_image *\fR\fIdst\fR, \fBconst mlib_image *\fR\fIsrc\fR, \fBmlib_s32\fR \fIcmask\fR, \fBmlib_edge\fR \fIedge\fR); .fi .SH DESCRIPTION .sp .LP 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. .sp .LP The Sobel filter is one of the special cases of gradient filter using the following horizontal and vertical masks: .sp .in +2 .nf 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 } .fi .in -2 .SH PARAMETERS .sp .LP Each function takes the following arguments: .sp .ne 2 .mk .na \fB\fIdst\fR\fR .ad .RS 9n .rt Pointer to destination image. .RE .sp .ne 2 .mk .na \fB\fIsrc\fR\fR .ad .RS 9n .rt Pointer to source image. .RE .sp .ne 2 .mk .na \fB\fIcmask\fR\fR .ad .RS 9n .rt Channel mask to indicate the channels to be processed, 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. .RE .sp .ne 2 .mk .na \fB\fIedge\fR\fR .ad .RS 9n .rt Type of edge condition. It can be one of the following: .sp .in +2 .nf MLIB_EDGE_DST_NO_WRITE MLIB_EDGE_DS_FILL_ZERO MLIB_EDGE_DST_COPY_SRC MLIB_EDGE_SR_EXTEND .fi .in -2 .RE .SH RETURN VALUES .sp .LP The function returns \fBMLIB_SUCCESS\fR if successful. Otherwise it returns \fBMLIB_FAILURE\fR. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBmlib_ImageGradient3x3\fR(3MLIB), \fBmlib_ImageGradient3x3_Fp\fR(3MLIB), \fBattributes\fR(5)