pbmclean

removes isolated pixels

TLDR

Remove noise from bitmap
$ pbmclean [input.pbm] > [output.pbm]
Set minimum connected size
$ pbmclean -minneigh=[4] [input.pbm] > [output.pbm]
Flip black/white for cleaning
$ pbmclean -black [input.pbm] > [output.pbm]

SYNOPSIS

pbmclean [options] [file]

DESCRIPTION

pbmclean removes isolated pixels. Cleans up noisy bitmaps.The tool removes speckles. Part of Netpbm.

PARAMETERS

FILE

Input PBM file.
-minneigh N
Minimum neighbor count.
-black
Clean black pixels.
-white
Clean white pixels.

INSTALL

sudo apt install netpbm
sudo dnf install netpbm
sudo pacman -S netpbm
sudo apk add netpbm
sudo zypper install netpbm
brew install netpbm
nix profile install nixpkgs#netpbm

CAVEATS

Part of Netpbm. PBM format only. May remove small details.

HISTORY

pbmclean is part of Netpbm for cleaning bitmap images.

SEE ALSO

pbm(5), pgmedge(1), netpbm(1)