haolinwei / pam-face-authentication

Automatically exported from code.google.com/p/pam-face-authentication
0 stars 0 forks source link

segementation fault in qt-facetrainer #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open qt-facetrainer
2. click Next
3. it crashes

What version of the product are you using? On what operating system?
Fedora 12 x86_64, pam-face-authentication version 0.3, OpenCV updated to
version 2 (from fedora's rawhide repo)in attempt to fix the problem (it
didn't help) 

Please provide any additional information below.
Webcam: 
Bus 002 Device 003: ID 04f2:b015 Chicony Electronics Co., Ltd VGA 24fps UVC
Webcam

which is a built in webcam in my HP laptop.

Relevant part from gdb's backtrace (I cant get the full backtrace because I
don't have enough disk space for all the debuginfo packages):

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bdaf65 in cvCanny (srcarr=<value optimized out>, 
    dstarr=<value optimized out>, low_thresh=<value optimized out>, 
    high_thresh=<value optimized out>, aperture_size=<value optimized out>)
    at cv/cvcanny.cpp:264
264                         if( m > high && !prev_flag && _map[j-mapstep]
!= 2 )

Original issue reported on code.google.com by smarte...@gmail.com on 18 Jan 2010 at 2:14

GoogleCodeExporter commented 9 years ago
Well let me check, I dont recall pfa calling cvCanny anywhere.. 

Original comment by rohan.a...@gmail.com on 18 Jan 2010 at 2:23

GoogleCodeExporter commented 9 years ago
could you find this line
 faceDetector.cpp 
change this line
        CvSeq* faces = cvHaarDetectObjects( small_img, cascade, storage,
                                            1.4, 2, 0
                                            // |CV_HAAR_FIND_BIGGEST_OBJECT
                                            //  |CV_HAAR_DO_ROUGH_SEARCH

                                            |CV_HAAR_DO_CANNY_PRUNING
                                            //|CV_HAAR_SCALE_IMAGE
                                            ,
                                            cvSize(80/scale, 80/scale) );

to

        CvSeq* faces = cvHaarDetectObjects( small_img, cascade, storage,
                                            1.4, 2, 0
                                            // |CV_HAAR_FIND_BIGGEST_OBJECT
                                            //  |CV_HAAR_DO_ROUGH_SEARCH

                                           // |CV_HAAR_DO_CANNY_PRUNING
                                            //|CV_HAAR_SCALE_IMAGE
                                            ,
                                            cvSize(80/scale, 80/scale) );

This is probably a bug in OpenCV. But i was able to get it running with opencv 
2.0. I
am not sure why this is happening.

Original comment by rohan.a...@gmail.com on 18 Jan 2010 at 2:30

GoogleCodeExporter commented 9 years ago
It works now!
Thank you for this quick fix, the fastest bugfix I've ever seen in an open 
source
project. :-)

Original comment by smarte...@gmail.com on 18 Jan 2010 at 2:37

GoogleCodeExporter commented 9 years ago
hehe, no problem :)

Original comment by rohan.a...@gmail.com on 18 Jan 2010 at 2:44