Hello. Brand new to perl but have been a PHP guy for many moons. I was led to perlmonks from someone on crunchbang linux forums and I hope someone can help. Yesterday I started getting into opencv for use with my linux box. After some struggling and making the whole thing a couple times, I finally got one of the tutorials to work in C++. But when I try to run a script from perl, it says this:
[Sat Jun 08 17:04:41 2013] [error] [client 192.168.1.1] /usr/bin/perl:
+ symbol lookup error: /usr/local/lib/perl/5.14.2/auto/Image/ObjectDet
+ect/ObjectDetect.so: undefined symbol: cvLoad
[Sat Jun 08 17:04:41 2013] [error] [client 192.168.1.1] Premature end
+of script headers: open1.pl
I looked and /usr/local/lib/perl/5.14.2/auto/Image/ObjectDetect/OpbjectDetect.so is right there and is read/execute for everyone, plus I've tried running the perl script from cgi-bin and sudo from the command line. I echoed $PERL5LIB var to see what the path was and it was blank. I know perl is working because my other perl starting out tutorials work fine. I added /usr/include and /usr/include/opencv to the path but I don't think that makes a difference. Here is the little script that is supposed to find faces in a picture:
#! /usr/bin/perl
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";
}
Easy right? I hope someone can help. I would rather use perl than c++ and skip that whole compilation step.