1mlib_ImageGradientMxN_Fp(3MmLeIdBi)aLib Library Functmiloinbs_ImageGradientMxN_Fp(3MLIB)
2
3
4

NAME

6       mlib_ImageGradientMxN_Fp - MxN gradient filter
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageGradientMxN_Fp(mlib_image *dst,
13            const mlib_image *src, const mlib_d64 *hmask,
14            const mlib_d64 *vmask, mlib_s32 m, mlib_s32 n, mlib_s32 dm,
15            mlib_s32 dn, mlib_s32 cmask, mlib_edge edge);
16
17

DESCRIPTION

19       The  mlib_ImageGradientMxN_Fp()  function  performs floating-point edge
20       detection by computing the magnitude of the image  gradient  vector  in
21       two orthogonal directions using MxN gradient filtering.
22
23
24       It uses the following equation:
25
26         dst[x][y][i] = ( SH(x,y,i)**2 + SV(x,y,i)**2 )**0.5
27
28
29
30       where  SH()  and  SV()  are the horizontal and vertical gradient images
31       generated from the corresponding channel of the source image by  corre‐
32       lating it with the supplied orthogonal (horizontal and vertical) gradi‐
33       ent masks.
34

PARAMETERS

36       The function takes the following arguments:
37
38       dst      Pointer to destination image.
39
40
41       src      Pointer to source image.
42
43
44       hmask    Pointer to horizontal mask in row-major order.
45
46
47       vmask    Pointer to vertical mask in row-major order.
48
49
50       m        Width of the convolution kernel. m > 1.
51
52
53       n        Height of the convolution kernel. n > 1.
54
55
56       dm       X coordinate of the key element in the convolution kernel. 0 ≤
57                dm < m.
58
59
60       dn       Y coordinate of the key element in the convolution kernel. 0 ≤
61                dn < n.
62
63
64       cmask    Channel mask to indicate the channels to  be  convolved,  each
65                bit  of  which represents a channel in the image. The channels
66                corresponding to 1 bits are those to be processed. For a  sin‐
67                gle channel image, the channel mask is ignored.
68
69
70       edge     Type of edge condition. It can be one of the following:
71
72                  MLIB_EDGE_DST_NO_WRITE
73                  MLIB_EDGE_DS_FILL_ZERO
74                  MLIB_EDGE_DST_COPY_SRC
75                  MLIB_EDGE_SR_EXTEND
76
77
78

RETURN VALUES

80       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
81       MLIB_FAILURE.
82

ATTRIBUTES

84       See attributes(5) for descriptions of the following attributes:
85
86
87
88
89       ┌─────────────────────────────┬─────────────────────────────┐
90       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
91       ├─────────────────────────────┼─────────────────────────────┤
92       │Interface Stability          │Committed                    │
93       ├─────────────────────────────┼─────────────────────────────┤
94       │MT-Level                     │MT-Safe                      │
95       └─────────────────────────────┴─────────────────────────────┘
96

SEE ALSO

98       mlib_ImageGradientMxN(3MLIB), mlib_ImageGradient3x3(3MLIB), mlib_Image‐
99       Gradient3x3_Fp(3MLIB), attributes(5)
100
101
102
103SunOS 5.11                        2 Mar 2007   mlib_ImageGradientMxN_Fp(3MLIB)
Impressum