NAME
Imager::Filter::Binarization - A collection of image binarization algorthims as image filter.
VERSION
version 0.002
SYNOPSIS
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");
DESCRIPTION
This module implements 2 different image binarization algorithms identified by "niblack"
, and "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.
AUTHOR
Kang-min Liu <gugod@gugod.org>
COPYRIGHT AND LICENSE
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.