1mlib_ImageSobel(3MLIB)    mediaLib Library Functions    mlib_ImageSobel(3MLIB)
2
3
4

NAME

6       mlib_ImageSobel, mlib_ImageSobel_Fp - Sobel filter
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageSobel(mlib_image *dst, const mlib_image *src,
13            mlib_s32 cmask, mlib_edge edge);
14
15
16       mlib_status mlib_ImageSobel_Fp(mlib_image *dst, const mlib_image *src,
17            mlib_s32 cmask, mlib_edge edge);
18
19

DESCRIPTION

21       Each  function  is  a  special case of the gradient filter, which is an
22       edge detector which computes the magnitude of the image gradient vector
23       in  two  orthogonal  directions. In this case, the gradient filter uses
24       specific horizontal and vertical masks.
25
26
27       The Sobel filter is one of the special cases of gradient  filter  using
28       the following horizontal and vertical masks:
29
30         hmask =  { -1.0, 0.0, 1.0,
31                    -2.0, 0.0, 2.0,
32                    -1.0, 0.0, 1.0 }
33
34         vmask =  { -1.0, -2.0, -1.0,
35                     0.0,  0.0,  0.0,
36                     1.0,  2.0,  1.0 }
37
38

PARAMETERS

40       Each function takes the following arguments:
41
42       dst      Pointer to destination image.
43
44
45       src      Pointer to source image.
46
47
48       cmask    Channel  mask  to  indicate the channels to be processed, each
49                bit of which represents a channel in the image.  The  channels
50                corresponding  to 1 bits are those to be processed. For a sin‐
51                gle channel image, the channel mask is ignored.
52
53
54       edge     Type of edge condition. It can be one of the following:
55
56                  MLIB_EDGE_DST_NO_WRITE
57                  MLIB_EDGE_DS_FILL_ZERO
58                  MLIB_EDGE_DST_COPY_SRC
59                  MLIB_EDGE_SR_EXTEND
60
61
62

RETURN VALUES

64       The function returns MLIB_SUCCESS if successful. Otherwise  it  returns
65       MLIB_FAILURE.
66

ATTRIBUTES

68       See attributes(5) for descriptions of the following attributes:
69
70
71
72
73       ┌─────────────────────────────┬─────────────────────────────┐
74       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
75       ├─────────────────────────────┼─────────────────────────────┤
76       │Interface Stability          │Committed                    │
77       ├─────────────────────────────┼─────────────────────────────┤
78       │MT-Level                     │MT-Safe                      │
79       └─────────────────────────────┴─────────────────────────────┘
80

SEE ALSO

82       mlib_ImageGradient3x3(3MLIB),          mlib_ImageGradient3x3_Fp(3MLIB),
83       attributes(5)
84
85
86
87SunOS 5.11                        2 Mar 2007            mlib_ImageSobel(3MLIB)
Impressum