Image-Signature

 view release on metacpan or  search on metacpan

Image/Signature/ColorHistogram.pm  view on Meta::CPAN

package Image::Signature::ColorHistogram;

use strict;
our $VERSION = '0.01';

use Image::Magick;

use Image::Signature::Vars;

sub color_histogram {
    my $self = shift;
    # sampling pixel distance
    my $spdist = shift() || 2;
    my $img = $self->{img};
    my $histogram;

Image/Signature/GrayMoment.pm  view on Meta::CPAN

package Image::Signature::GrayMoment;

use strict;
our $VERSION = '0.01';

use Image::Magick;

use Image::Signature::Grayscale;


sub gray_moment {
    my $self = shift;
    my $img = $self->{img};

    my ($row, $col);
    $row = $self->{row};

META.yml  view on Meta::CPAN

name: Image-Signature
module_name: Image::Signature
version: 0.01
author: xern <xern@cpan.org>
distribution_type: module
requires:
  List::Util: 0
  Image::Magick: 5.5.7
private:
  directory:
    - inc
generated_by: Module::Install version 0.22

Makefile.PL  view on Meta::CPAN

use inc::Module::Install;


WriteMakefile(
    'NAME'		=> 'Image::Signature',
    'VERSION_FROM'	=> 'Signature.pm', 
    'PREREQ_PM'		=> {
	'Image::Magick' => '5.5.7',
	'List::Util' => '0',
    }, 
    ($] >= 5.005 ?    
      (ABSTRACT_FROM => 'Signature.pm', 
       AUTHOR     => 'xern <xern@cpan.org>') : ()),
);

Signature.pm  view on Meta::CPAN

package Image::Signature;

use strict;
our $VERSION = '0.01';

use Image::Magick;

use Image::Signature::Vars;

use Image::Signature::ColorHistogram;
use Image::Signature::GrayMoment;

our @ISA =
    qw(
     Image::Signature::ColorHistogram
     Image::Signature::GrayMoment

       );


sub new {
    my $pkg = shift;
    my $arg = shift;
    my $img;
    if(! ref($arg) ){
	$img = Image::Magick->new;
	$img->Read($arg);
    }
    else {
	$img = $arg;
    }
    my ($row, $col) = $img->Get(qw/rows columns/);

    bless {
	version => $VERSION,
	img => $img,

Signature.pm  view on Meta::CPAN

 $sig_obj->gray_moment;

=head2 compare

Compares the similarity between two image objects.

 $sig_objA->compare($sig_objB);

=head1 SEE ALSO

L<GD>, L<Image::Magick>

=head1 BUGS AND TODOs

Must be many. Please report them to me.

=head1 COPYRIGHT

xern E<lt>xern@cpan.orgE<gt>

This module is free software; you can redistribute it or modify it under the same terms as Perl itself.



( run in 0.595 second using v1.01-cache-2.11-cpan-beeb90c9504 )