1Pbmclean User Manual(0)                                Pbmclean User Manual(0)
2
3
4

NAME

6       pbmclean - despeckle a PBM image
7
8

SYNOPSIS

10       pbmclean [-minneighbors=N] [-black|-white] [-extended] [pbmfile]
11
12

OPTION USAGE

14       You  can  use  the minimum unique abbreviation of the options.  You can
15       use two hyphens instead of one.  You can separate an option  name  from
16       its value with white space instead of an equals sign.
17
18

DESCRIPTION

20       This program is part of Netpbm(1).
21
22       pbmclean  cleans up a PBM image of random specks.  It reads a PBM image
23       as input and outputs a PBM that is the same as the  input  except  with
24       isolated pixels inverted.
25
26       You can use pbmclean  to clean up "snow" on bitmap images.
27
28       There  are  two  ways pbmclean can define "isolated" pixels: simple and
29       extended.  When you specify -extended, pbmclean uses  extended;  other‐
30       wise it uses basic.
31
32
33
34       In basic mode, pbmclean looks at each pixel individually, and any
35       pixel that doesn't have at least a minimum number of pixels of the same
36       color touching it is considered isolated and pbmclean erases it.
37
38       The -minneighbors option specifies the minimum  number  of  neighboring
39       pixels of the same color for a pixel not to be considered isolated.
40
41       For example, if -minneighbors is two and there are two contiguous black
42       pixels in an otherwise white field, each of those pixels  is  isolated,
43       so pbmclean erases them - turns both white.
44
45       The  default  minimum 1 pixel - pbmclean flips only completely isolated
46       pixels.
47
48       (A -minneighbors value greater than 8 generates a  completely  inverted
49       image  (but  use pnminvert to do that) -- or a completely white or com‐
50       pletely black image with the -black or -white option).
51
52       pbmclean considers the area beyond the edges of the image to be  white.
53       (This matters when you consider pixels right on the edge of the image).
54
55       pbmclean  does  not  distinguish  between foreground and background; by
56       default, it flips isolated pixels of either color.  But you can specify
57       -black or -white to have it flip only pixels of one color.
58
59
60
61       In extended mode, pbmclean erases all blobs which don't have the
62       specified minimum number of pixels.  A blob is a set of contiguous pix‐
63       els of the foreground color.  The minimum number of pixels is one  plus
64       the  -minneighbors value.  You specify the foreground color with -black
65       and -white (default is black).
66
67       For example, if -minneighbors is 2 and the foreground color  is  black,
68       and  the  image contains a straight line 4 pixels long, pbmclean erases
69       that -- turns all four pixels white.  pbmclean also erases 4 pixels  in
70       a square or L-shape.
71
72       The  default  -minneighbors is 4, so a blob must have at least 5 pixels
73       to escape pbmclean's purge.
74
75       Extended mode was new in Netpbm 10.56 (September 2011).
76
77
78

OPTIONS

80       -black
81
82
83       -white Flip pixels of the specified color.  By default, if you  specify
84              neither  -black  nor -white, pbmclean flips both black and white
85              pixels which do not have sufficient identical neighbors.  If you
86              specify  -black, pbmclean leaves the white pixels alone and just
87              erases isolated black pixels.  Vice versa for -white.   You  may
88              specify  both  -black  and -white to get the same as the default
89              behavior.
90
91
92       -minneighbors=N
93              This determines how many pixels must be in a  cluster  in  order
94              for  pbmclean to consider them legitimate and not clean them out
95              of the image.  See Description ⟨#description⟩ .
96
97              Before December 2001, pbmclean accepted -N instead of -minneigh‐
98              bors.  Before Netpbm 10.27 (March 2005), -minneighbors was -min‐
99              neighbor.
100
101
102       -extended
103              pbmclean uses extended, as  opposed  to  basic,  isolated  pixel
104              detection.
105
106              This option was new in Netpbm 10.56 (September 2011).
107
108
109
110

SEE ALSO

112       pbm(1)
113
114

AUTHOR

116       Copyright (C) 1990 by Angus Duggan Copyright (C) 1989 by Jef Poskanzer.
117       Copyright (C) 2001 by Michael Sternberg.
118
119       Permission to use, copy, modify, and distribute this software  and  its
120       documentation  for  any purpose and without fee is hereby granted, pro‐
121       vided that the above copyright notice appear in  all  copies  and  that
122       both  that  copyright  notice and this permission notice appear in sup‐
123       porting documentation.  This  software  is  provided  "as  is"  without
124       express or implied warranty.
125

DOCUMENT SOURCE

127       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
128       source.  The master documentation is at
129
130              http://netpbm.sourceforge.net/doc/pbmclean.html
131
132netpbm documentation           19 November 2011        Pbmclean User Manual(0)
Impressum