1mlib_ImageConvMxN_Fp(3MLIB)mediaLib Library Functionsmlib_ImageConvMxN_Fp(3MLIB)
2
3
4

NAME

6       mlib_ImageConvMxN_Fp - MxN convolution
7

SYNOPSIS

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

DESCRIPTION

18       The  mlib_ImageConvMxN_Fp()  function performs a MxN convolution on the
19       source image by using the user-supplied kernel.
20
21
22       The input image and the output image must have the same image type  and
23       have the same number of channels. The unselected channels in the output
24       image are not overwritten. For single-channel images, the channel  mask
25       is ignored.
26
27
28       For  this  convolution,  the  key  element of the convolution kernel is
29       located at (dm, dn) of the kernel matrix.
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 bits with a value of 1 are those to be  pro‐
71                 cessed.  For  a  single-channel  image,  the  channel mask is
72                 ignored.
73
74
75       edge      Type of edge condition. It can be one of the following:
76
77                   MLIB_EDGE_DST_NO_WRITE
78                   MLIB_EDGE_DST_FILL_ZERO
79                   MLIB_EDGE_DST_COPY_SRC
80                   MLIB_EDGE_SRC_EXTEND
81
82
83

RETURN VALUES

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

ATTRIBUTES

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

SEE ALSO

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