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   Basic Mode
34       In basic mode, pbmclean looks at each pixel individually, and any pixel
35       that doesn't have at least a minimum number of pixels of the same color
36       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   Extended Mode
61       In extended mode, pbmclean erases all blobs which don't have the speci‐
62       fied minimum number of pixels.  A blob is a set of contiguous pixels of
63       the foreground color.  The minimum number of pixels  is  one  plus  the
64       -minneighbors  value.  You specify the foreground color with -black and
65       -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       In addition to the options common to all programs  based  on  libnetpbm
81       (most notably -quiet, see
82        Common  Options  ⟨index.html#commonoptions⟩ ), pbmclean recognizes the
83       following command line options:
84
85
86
87       -black
88
89
90       -white Flip pixels of the specified color.  By default, if you  specify
91              neither  -black  nor -white, pbmclean flips both black and white
92              pixels which do not have sufficient identical neighbors.  If you
93              specify  -black, pbmclean leaves the white pixels alone and just
94              erases isolated black pixels.  Vice versa for -white.   You  may
95              specify  both  -black  and -white to get the same as the default
96              behavior.
97
98
99       -minneighbors=N
100              This determines how many pixels must be in a  cluster  in  order
101              for  pbmclean to consider them legitimate and not clean them out
102              of the image.  See Description ⟨#description⟩ .
103
104              Before December 2001, pbmclean accepted -N instead of -minneigh‐
105              bors.  Before Netpbm 10.27 (March 2005), -minneighbors was -min‐
106              neighbor.
107
108
109       -extended
110              pbmclean uses extended, as  opposed  to  basic,  isolated  pixel
111              detection.
112
113              This option was new in Netpbm 10.56 (September 2011).
114
115
116
117

SEE ALSO

119       pbm(1)
120
121

AUTHOR

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

DOCUMENT SOURCE

134       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
135       source.  The master documentation is at
136
137              http://netpbm.sourceforge.net/doc/pbmclean.html
138
139netpbm documentation           19 November 2011        Pbmclean User Manual(0)
Impressum