HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

pbmclean — Clean up a PBM image by erasing isolated black and white pixels. More information: <https://netpbm.s

Submitted by: @import:tldr-pages··
0
Viewed 0 times
erasingcommandcleancliimageisolatedpbmpbmclean

Problem

How to use the pbmclean command: Clean up a PBM image by erasing isolated black and white pixels. More information: <https://netpbm.sourceforge.net/doc/pbmclean.html>.

Solution

pbmclean — Clean up a PBM image by erasing isolated black and white pixels. More information: <https://netpbm.sourceforge.net/doc/pbmclean.html>.

Clean up a PBM image by erasing isolated black and white pixels:
pbmclean {{path/to/image.pbm}} > {{path/to/output.pbm}}


Clean up only black/white pixels:
pbmclean -{{black|white}} {{path/to/image.pbm}} > {{path/to/output.pbm}}


Specify the minimum number of neighbouring pixels of the same color in order for a pixel not to be considered isolated:
pbmclean {{[-m|-minneighbours]}} {{3}} {{path/to/image.pbm}} > {{path/to/output.pbm}}

Code Snippets

Clean up a PBM image by erasing isolated black and white pixels

pbmclean {{path/to/image.pbm}} > {{path/to/output.pbm}}

Clean up only black/white pixels

pbmclean -{{black|white}} {{path/to/image.pbm}} > {{path/to/output.pbm}}

Specify the minimum number of neighbouring pixels of the same color in order for a pixel not to be considered isolated

pbmclean {{[-m|-minneighbours]}} {{3}} {{path/to/image.pbm}} > {{path/to/output.pbm}}

Context

tldr-pages: common/pbmclean

Revisions (0)

No revisions yet.