1mlib_ImageErode8(3MLIB) mediaLib Library Functions mlib_ImageErode8(3MLIB)
2
3
4
6 mlib_ImageErode8 - eight neighbor erode
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageErode8(mlib_image *dst, const mlib_image *src);
13
14
16 The mlib_ImageErode8() function performs an erode operation on an image
17 by using all eight of each pixel's neighbors. The source and destina‐
18 tion images must be single-channel images. The data type can be
19 MLIB_BIT, MLIB_BYTE, MLIB_SHORT, MLIB_USHORT, or MLIB_INT.
20
21
22 For 8-neighbor binary images, it uses the following equation:
23
24 dst[x][y][0] = AND{ src[p][q][0],
25 x-1 ≤ p ≤ x+1; y-1 ≤ q ≤ y+1 }
26
27
28
29 For 8-neighbor grayscale images, it uses the following equation:
30
31 dst[x][y][0] = MIN{ src[p][q][0],
32 x-1 ≤ p ≤ x+1; y-1 ≤ q ≤ y+1 }
33
34
35
36 where x = 1, ..., w-2; y = 1, ..., h-2.
37
39 The function takes the following arguments:
40
41 dst Pointer to destination image.
42
43
44 src Pointer to source image.
45
46
48 The function returns MLIB_SUCCESS if successful. Otherwise it returns
49 MLIB_FAILURE.
50
52 See attributes(5) for descriptions of the following attributes:
53
54
55
56
57 ┌─────────────────────────────┬─────────────────────────────┐
58 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
59 ├─────────────────────────────┼─────────────────────────────┤
60 │Interface Stability │Committed │
61 ├─────────────────────────────┼─────────────────────────────┤
62 │MT-Level │MT-Safe │
63 └─────────────────────────────┴─────────────────────────────┘
64
66 mlib_ImageErode4(3MLIB), mlib_ImageErode4_Fp(3MLIB),
67 mlib_ImageErode8_Fp(3MLIB), attributes(5)
68
69
70
71SunOS 5.11 2 Mar 2007 mlib_ImageErode8(3MLIB)