1mlib_ImageGradient3x3_Fp(3MmLeIdBi)aLib Library Functmiloinbs_ImageGradient3x3_Fp(3MLIB)
2
3
4
6 mlib_ImageGradient3x3_Fp - 3x3 gradient filter
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageGradient3x3_Fp(mlib_image *dst,
13 const mlib_image *src, const mlib_d64 *hmask,
14 const mlib_d64 *vmask, mlib_s32 cmask, mlib_edge edge);
15
16
18 The mlib_ImageGradient3x3_Fp() function performs floating-point edge
19 detection by computing the magnitude of the image gradient vector in
20 two orthogonal directions using 3x3 gradient filtering.
21
22
23 It uses the following equation:
24
25 dst[x][y][i] = ( SH(x,y,i)**2 + SV(x,y,i)**2 )**0.5
26
27
28
29 where SH() and SV() are the horizontal and vertical gradient images
30 generated from the corresponding channel of the source image by corre‐
31 lating it with the supplied orthogonal (horizontal and vertical) gradi‐
32 ent masks.
33
35 The function takes the following arguments:
36
37 dst Pointer to destination image.
38
39
40 src Pointer to source image.
41
42
43 hmask Pointer to horizontal mask in row-major order.
44
45
46 vmask Pointer to vertical mask in row-major order.
47
48
49 cmask Channel mask to indicate the channels to be convolved, each
50 bit of which represents a channel in the image. The channels
51 corresponding to 1 bits are those to be processed. For a sin‐
52 gle channel image, the channel mask is ignored.
53
54
55 edge Type of edge condition. It can be one of the following:
56
57 MLIB_EDGE_DST_NO_WRITE
58 MLIB_EDGE_DS_FILL_ZERO
59 MLIB_EDGE_DST_COPY_SRC
60 MLIB_EDGE_SR_EXTEND
61
62
63
65 The function returns MLIB_SUCCESS if successful. Otherwise it returns
66 MLIB_FAILURE.
67
69 See attributes(5) for descriptions of the following attributes:
70
71
72
73
74 ┌─────────────────────────────┬─────────────────────────────┐
75 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
76 ├─────────────────────────────┼─────────────────────────────┤
77 │Interface Stability │Committed │
78 ├─────────────────────────────┼─────────────────────────────┤
79 │MT-Level │MT-Safe │
80 └─────────────────────────────┴─────────────────────────────┘
81
83 mlib_ImageGradient3x3(3MLIB), mlib_ImageGradientMxN(3MLIB), mlib_Image‐
84 GradientMxN_Fp(3MLIB), attributes(5)
85
86
87
88SunOS 5.11 2 Mar 2007 mlib_ImageGradient3x3_Fp(3MLIB)