Image::ObjectDetect - detects objects from picture(using opencv)
use Image::ObjectDetect; my $cascade = 'haarcascade_frontalface_alt2.xml'; my $file = 'picture.jpg'; my $detector = Image::ObjectDetect->new($cascade); @faces = $detector->detect($file); for my $face (@faces) { print $face->{x}, "\n"; print $face->{y}, "\n"; print $face->{width}, "\n"; print $face->{height}, "\n"; } # or just like this my @faces = detect_objects($cascade, $file);
Image::ObjectDetect is a simple module to detect objects from picture using opencv.
It is available at: http://sourceforge.net/projects/opencvlibrary/
Returns an instance of this module.
Detects objects from picture.
detect_objects
Jiro Nishiguchi <jiro@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://sourceforge.net/projects/opencvlibrary/
To install Image::ObjectDetect, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Image::ObjectDetect
CPAN shell
perl -MCPAN -e shell install Image::ObjectDetect
For more information on module installation, please visit the detailed CPAN module installation guide.