The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Image::ObjectDetect - detects objects from picture(using opencv)

SYNOPSIS

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);

DESCRIPTION

Image::ObjectDetect is a simple module to detect objects from picture using opencv.

It is available at: http://sourceforge.net/projects/opencvlibrary/

METHODS

new($cascade)

Returns an instance of this module.

detect($file)

Detects objects from picture.

FUNCTIONS

detect_objects($cascade, $file)

Detects objects from picture.

EXPORT

detect_objects

AUTHOR

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.

SEE ALSO

http://sourceforge.net/projects/opencvlibrary/