1mlib_ImageThresh1(3MLIB)  mediaLib Library Functions  mlib_ImageThresh1(3MLIB)
2
3
4

NAME

6       mlib_ImageThresh1 - image thresholding
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageThresh1(mlib_image *dst, const mlib_image *src,
13            const mlib_s32 *thresh, const mlib_s32 *ghigh, const mlib_s32 *glow);
14
15

DESCRIPTION

17       The  mlib_ImageThresh1()  function  compares  each  pixel in the source
18       image to a threshold value. If the pixel is less than or equal  to  the
19       threshold  value,  then  the destination pixel is set to the low output
20       level. If the pixel is greater than the threshold value, then the  des‐
21       tination 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

PARAMETERS

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

RETURN VALUES

56       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
57       MLIB_FAILURE.
58

ATTRIBUTES

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

SEE ALSO

74       mlib_ImageThresh1_Fp(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(3MLIB)
Impressum