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