1mlib_ImageConvolveMxN_Fp(3MmLeIdBi)aLib Library Functmiloinbs_ImageConvolveMxN_Fp(3MLIB)
2
3
4

NAME

6       mlib_ImageConvolveMxN_Fp  -  MxN  convolution, with kernel analysis for
7       taking advantage of special cases
8

SYNOPSIS

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

DESCRIPTION

19       The mlib_ImageConvolveMxN_Fp() function analyzes the  convolution  ker‐
20       nel,  then  performs  a  MxN convolution on the source image by calling
21       either one of the functions like  mlib_ImageSConv3x3_Fp(),  mlib_Image‐
22       Conv3x3_Fp(),  and  etc.  in special cases or mlib_ImageConvMxN_Fp() in
23       other cases.
24
25
26       The input image and the output image must have the same image type  and
27       have the same number of channels. The unselected channels in the output
28       image are not overwritten. For single-channel images, the channel  mask
29       is ignored.
30
31
32       It uses the following equation:
33
34                        m-1-dm n-1-dn
35         dst[x][y][i] =  SUM    SUM  src[x+p][y+q][i]*k[p][q]
36                        p=-dm  q=-dn
37
38
39
40       where m ≥ 1, n ≥ 1, 0 ≤ dm < m, 0 ≤ dn < n.
41

PARAMETERS

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

RETURN VALUES

84       The function returns MLIB_SUCCESS if successful. Otherwise  it  returns
85       MLIB_FAILURE.
86

ATTRIBUTES

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

SEE ALSO

102       mlib_ImageConv2x2(3MLIB),    mlib_ImageConv2x2_Fp(3MLIB),   mlib_Image‐
103       Conv2x2Index(3MLIB),       mlib_ImageConv3x3(3MLIB),        mlib_Image‐
104       Conv3x3_Fp(3MLIB),      mlib_ImageConv3x3Index(3MLIB),      mlib_Image‐
105       Conv4x4(3MLIB),        mlib_ImageConv4x4_Fp(3MLIB),         mlib_Image‐
106       Conv4x4Index(3MLIB),        mlib_ImageConv5x5(3MLIB),       mlib_Image‐
107       Conv5x5_Fp(3MLIB),      mlib_ImageConv5x5Index(3MLIB),      mlib_Image‐
108       Conv7x7(3MLIB),         mlib_ImageConv7x7_Fp(3MLIB),        mlib_Image‐
109       Conv7x7Index(3MLIB), mlib_ImageConvKernelConvert(3MLIB), mlib_ImageCon‐
110       vMxN(3MLIB),      mlib_ImageConvMxN_Fp(3MLIB),     mlib_ImageConvMxNIn‐
111       dex(3MLIB),  mlib_ImageConvolveMxN(3MLIB),   mlib_ImageSConv3x3(3MLIB),
112       mlib_ImageSConv3x3_Fp(3MLIB),                mlib_ImageSConv5x5(3MLIB),
113       mlib_ImageSConv5x5_Fp(3MLIB),                mlib_ImageSConv7x7(3MLIB),
114       mlib_ImageSConv7x7_Fp(3MLIB),      mlib_ImageSConvKernelConvert(3MLIB),
115       attributes(5)
116
117
118
119SunOS 5.11                        2 Mar 2007   mlib_ImageConvolveMxN_Fp(3MLIB)
Impressum