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

NAME

6       mlib_ImageThresh4 - image thresholding
7

SYNOPSIS

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

DESCRIPTION

18       The  mlib_ImageThresh4()  function  compares  each  pixel in the source
19       image to two threshold values, tlow and thigh. If  the  pixel  is  less
20       than the lower threshold value, tlow, then the destination pixel is set
21       to the lower output level, glow. If  the  pixel  is  greater  than  the
22       higher threshold value, thigh, then the destination pixel is set to the
23       higher output level, ghigh. Otherwise, the destination pixel is set  to
24       the value of the source pixel.
25
26
27       It uses the following equation:
28
29         dst[x][y][i] = glow[i]       if src[x][y][i] < tlow[i]
30         dst[x][y][i] = src[x][y][i]  if tlow[i] ≤ src[x][y][i] ≤ thigh[i]
31         dst[x][y][i] = ghigh[i]      if src[x][y][i] > thigh[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       thigh    High  threshold  value.  thigh[i] holds the high threshold for
44                channel i.
45
46
47       tlow     Low threshold value. tlow[i] holds the low threshold for chan‐
48                nel i.
49
50
51       ghigh    High  output  grayscale  level. ghigh[i] holds the high output
52                grayscale level for channel i.
53
54
55       glow     Low output grayscale  level.  glow[i]  holds  the  low  output
56                grayscale level for channel i.
57
58

RETURN VALUES

60       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
61       MLIB_FAILURE.
62

ATTRIBUTES

64       See attributes(5) for descriptions of the following attributes:
65
66
67
68
69       ┌─────────────────────────────┬─────────────────────────────┐
70       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
71       ├─────────────────────────────┼─────────────────────────────┤
72       │Interface Stability          │Committed                    │
73       ├─────────────────────────────┼─────────────────────────────┤
74       │MT-Level                     │MT-Safe                      │
75       └─────────────────────────────┴─────────────────────────────┘
76

SEE ALSO

78       mlib_ImageThresh1(3MLIB),  mlib_ImageThresh1_Fp(3MLIB),   mlib_ImageTh‐
79       resh1_Fp_Inp(3MLIB),     mlib_ImageThresh1_Inp(3MLIB),    mlib_ImageTh‐
80       resh2(3MLIB),        mlib_ImageThresh2_Fp(3MLIB),         mlib_ImageTh‐
81       resh2_Fp_Inp(3MLIB),     mlib_ImageThresh2_Inp(3MLIB),    mlib_ImageTh‐
82       resh3(3MLIB),        mlib_ImageThresh3_Fp(3MLIB),         mlib_ImageTh‐
83       resh3_Fp_Inp(3MLIB),     mlib_ImageThresh3_Inp(3MLIB),    mlib_ImageTh‐
84       resh4_Fp(3MLIB),     mlib_ImageThresh4_Fp_Inp(3MLIB),     mlib_ImageTh‐
85       resh4_Inp(3MLIB),        mlib_ImageThresh5(3MLIB),        mlib_ImageTh‐
86       resh5_Fp(3MLIB),     mlib_ImageThresh5_Fp_Inp(3MLIB),     mlib_ImageTh‐
87       resh5_Inp(3MLIB), attributes(5)
88
89
90
91SunOS 5.11                        2 Mar 2007          mlib_ImageThresh4(3MLIB)
Impressum