1mlib_ImageSConv3x3(3MLIB) mediaLib Library Functions mlib_ImageSConv3x3(3MLIB)
2
3
4
6 mlib_ImageSConv3x3 - separable 3x3 convolution
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageSConv3x3(mlib_image *dst, const mlib_image *src,
13 const mlib_s32 *hkernel, const mlib_s32 *vkernel, mlib_s32 scale,
14 mlib_s32 cmask, mlib_edge edge);
15
16
18 The mlib_ImageSConv3x3() function performs a separable 3x3 convolution
19 on the source image by using the user-supplied kernel.
20
21
22 It uses the following equation:
23
24 m-1-dm n-1-dn
25 dst[x][y][i] = SUM SUM src[x+p][y+q][i]*h[p]*v[q]*2**(-2*scale)
26 p=-dm q=-dn
27
28
29
30 where m = 3, n = 3, dm = (m - 1)/2 = 1, dn = (n - 1)/2 = 1.
31
33 The function takes the following arguments:
34
35 dst Pointer to destination image.
36
37
38 src Pointer to source image.
39
40
41 hkernel Pointer to the horizontal kernel.
42
43
44 vkernel Pointer to the vertical kernel.
45
46
47 scale Scaling factor.
48
49
50 cmask Channel mask to indicate the channels to be convolved, each
51 bit of which represents a channel in the image. The channels
52 corresponding to one bits are those to be processed. For a
53 single-channel image, the channel mask is ignored.
54
55
56 edge Type of edge condition. It can be one of the following:
57
58 MLIB_EDGE_DST_NO_WRITE
59 MLIB_EDGE_DST_FILL_ZERO
60 MLIB_EDGE_DST_COPY_SRC
61 MLIB_EDGE_SRC_EXTEND
62
63
64
66 The function returns MLIB_SUCCESS if successful. Otherwise it returns
67 MLIB_FAILURE.
68
70 See attributes(5) for descriptions of the following attributes:
71
72
73
74
75 ┌─────────────────────────────┬─────────────────────────────┐
76 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
77 ├─────────────────────────────┼─────────────────────────────┤
78 │Interface Stability │Committed │
79 ├─────────────────────────────┼─────────────────────────────┤
80 │MT-Level │MT-Safe │
81 └─────────────────────────────┴─────────────────────────────┘
82
84 mlib_ImageConv2x2(3MLIB), mlib_ImageConv2x2_Fp(3MLIB), mlib_Image‐
85 Conv2x2Index(3MLIB), mlib_ImageConv3x3(3MLIB), mlib_Image‐
86 Conv3x3_Fp(3MLIB), mlib_ImageConv3x3Index(3MLIB), mlib_Image‐
87 Conv4x4(3MLIB), mlib_ImageConv4x4_Fp(3MLIB), mlib_Image‐
88 Conv4x4Index(3MLIB), mlib_ImageConv5x5(3MLIB), mlib_Image‐
89 Conv5x5_Fp(3MLIB), mlib_ImageConv5x5Index(3MLIB), mlib_Image‐
90 Conv7x7(3MLIB), mlib_ImageConv7x7_Fp(3MLIB), mlib_Image‐
91 Conv7x7Index(3MLIB), mlib_ImageConvKernelConvert(3MLIB), mlib_ImageCon‐
92 vMxN(3MLIB), mlib_ImageConvMxN_Fp(3MLIB), mlib_ImageConvMxNIn‐
93 dex(3MLIB), mlib_ImageConvolveMxN(3MLIB), mlib_ImageCon‐
94 volveMxN_Fp(3MLIB), mlib_ImageSConv3x3_Fp(3MLIB),
95 mlib_ImageSConv5x5(3MLIB), mlib_ImageSConv5x5_Fp(3MLIB),
96 mlib_ImageSConv7x7(3MLIB), mlib_ImageSConv7x7_Fp(3MLIB),
97 mlib_ImageSConvKernelConvert(3MLIB), attributes(5)
98
99
100
101SunOS 5.11 2 Mar 2007 mlib_ImageSConv3x3(3MLIB)