1mlib_ImageThresh1_Fp(3MLIB)mediaLib Library Functionsmlib_ImageThresh1_Fp(3MLIB)
2
3
4
6 mlib_ImageThresh1_Fp - image thresholding
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageThresh1_Fp(mlib_image *dst, const mlib_image *src,
13 const mlib_d64 *thresh, const mlib_d64 *ghigh, const mlib_d64 *glow);
14
15
17 The mlib_ImageThresh1_Fp() function compares each pixel in the float‐
18 ing-point source image to a threshold value. If the pixel is less than
19 or equal to the threshold value, then the destination pixel is set to
20 the low output level. If the pixel is greater than the threshold value,
21 then the destination pixel is set to the high output level.
22
23
24 The data type of the destination image can be MLIB_BIT or can be the
25 same as the data type of the source image.
26
27
28 It uses the following equation:
29
30 dst[x][y][i] = glow[i] if src[x][y][i] ≤ thresh[i]
31 dst[x][y][i] = ghigh[i] if src[x][y][i] > thresh[i]
32
33
35 The function takes the following arguments:
36
37 dst Pointer to destination image.
38
39
40 src Pointer to source image.
41
42
43 thresh Threshold value. thresh[i] contains the threshold for channel
44 i.
45
46
47 ghigh High output level. ghigh[i] contains the high output level
48 for channel i.
49
50
51 glow Low output level. glow[i] contains the low output level for
52 channel i.
53
54
56 The function returns MLIB_SUCCESS if successful. Otherwise it returns
57 MLIB_FAILURE.
58
60 See attributes(5) for descriptions of the following attributes:
61
62
63
64
65 ┌─────────────────────────────┬─────────────────────────────┐
66 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
67 ├─────────────────────────────┼─────────────────────────────┤
68 │Interface Stability │Committed │
69 ├─────────────────────────────┼─────────────────────────────┤
70 │MT-Level │MT-Safe │
71 └─────────────────────────────┴─────────────────────────────┘
72
74 mlib_ImageThresh1(3MLIB), mlib_ImageThresh1_Fp_Inp(3MLIB),
75 mlib_ImageThresh1_Inp(3MLIB), mlib_ImageThresh2(3MLIB), mlib_ImageTh‐
76 resh2_Fp(3MLIB), mlib_ImageThresh2_Fp_Inp(3MLIB), mlib_ImageTh‐
77 resh2_Inp(3MLIB), mlib_ImageThresh3(3MLIB), mlib_ImageTh‐
78 resh3_Fp(3MLIB), mlib_ImageThresh3_Fp_Inp(3MLIB), mlib_ImageTh‐
79 resh3_Inp(3MLIB), mlib_ImageThresh4(3MLIB), mlib_ImageTh‐
80 resh4_Fp(3MLIB), mlib_ImageThresh4_Fp_Inp(3MLIB), mlib_ImageTh‐
81 resh4_Inp(3MLIB), mlib_ImageThresh5(3MLIB), mlib_ImageTh‐
82 resh5_Fp(3MLIB), mlib_ImageThresh5_Fp_Inp(3MLIB), mlib_ImageTh‐
83 resh5_Inp(3MLIB), attributes(5)
84
85
86
87SunOS 5.11 2 Mar 2007 mlib_ImageThresh1_Fp(3MLIB)