1mlib_ImageCopyMask(3MLIB) mediaLib Library Functions mlib_ImageCopyMask(3MLIB)
2
3
4
6 mlib_ImageCopyMask - copy with mask
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageCopyMask(mlib_image *dst, const mlib_image *src,
13 const mlib_image *mask, const mlib_s32 *thresh);
14
15
17 The mlib_ImageCopyMask() function copies one image to another image via
18 a mask image by using it as a yes/no indicator. The data type of the
19 images can be MLIB_BYTE, MLIB_SHORT, MLIB_USHORT, or MLIB_INT.
20
21
22 It uses the following equation:
23
24 dst[x][y][i] = src[x][y][i] if mask[x][y][i] ≤ thresh[i]
25 dst[x][y][i] = dst[x][y][i] if mask[x][y][i] > thresh[i]
26
27
29 The function takes the following arguments:
30
31 dst Pointer to destination image.
32
33
34 src Pointer to source image.
35
36
37 mask Pointer to mask image.
38
39
40 thresh Threshold for the mask image. thresh[i] contains the thresh‐
41 old for channel i.
42
43
45 The function returns MLIB_SUCCESS if successful. Otherwise it returns
46 MLIB_FAILURE.
47
49 See attributes(5) for descriptions of the following attributes:
50
51
52
53
54 ┌─────────────────────────────┬─────────────────────────────┐
55 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
56 ├─────────────────────────────┼─────────────────────────────┤
57 │Interface Stability │Committed │
58 ├─────────────────────────────┼─────────────────────────────┤
59 │MT-Level │MT-Safe │
60 └─────────────────────────────┴─────────────────────────────┘
61
63 mlib_ImageCopy(3MLIB), mlib_ImageCopyArea(3MLIB), mlib_ImageCopy‐
64 Mask_Fp(3MLIB), mlib_ImageCopySubimage(3MLIB), attributes(5)
65
66
67
68SunOS 5.11 2 Mar 2007 mlib_ImageCopyMask(3MLIB)