Imager::Filter::Binarization - A collection of image binarization algorthims as image filter.
version 0.002
use Imager; use Imager::Filter::Binarization; my $img = Imager->new(file => $file) or die Imager->errstr; $img->filter( type => "binarization", method => "niblack", geometry => "5x5" ); $img->write(file => "binarized.png");
This module implements 2 different image binarization algorithms identified by "niblack", and "sauvola".
"niblack"
"sauvola"
$img->filter( type => "binarization", method => "niblack", geometry => "5x5" ); $img->filter( type => "binarization", method => "sauvola", geometry => "5x5" );
The input image $img is assumed to be grayscale, only the first channel (red) is used to perform binarization.
$img
Kang-min Liu <gugod@gugod.org>
Kang-min Liu has dedicated the work to the Commons by waiving all of his or her rights to the work worldwide under copyright law and all related or neighboring legal rights he or she had in the work, to the extent allowable by law.
Works under CC0 do not require attribution. When citing the work, you should not imply endorsement by the author.
To install Imager::Filter::Binarization, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Imager::Filter::Binarization
CPAN shell
perl -MCPAN -e shell install Imager::Filter::Binarization
For more information on module installation, please visit the detailed CPAN module installation guide.