neha01 / FaceRecognition

Face Recognition using OpenCV in Python
161 stars 146 forks source link

Error in printing faces_detected #2

Closed shubham-dixit closed 5 years ago

shubham-dixit commented 5 years ago

I am having this error on printing faces_detected after using faceDetection module -

OpenCV(3.4.2) c:\miniconda3\conda-bld\opencv-suite_1534379934306\work\modules\imgproc\src\color.hpp:253: error: (-215:Assertion failed) VScn::contains(scn) && VDcn::contains(dcn) && VDepth::contains(depth) in function 'cv::CvtHelper<struct cv::Set<3,4,-1>,struct cv::Set<1,-1,-1>,struct cv::Set<0,2,5>,2>::CvtHelper'

in the line - gray_img = cv2.cvtColor(test_img,cv2.COLOR_BGR2GRAY)

neha01 commented 5 years ago

It seems the image is not getting loaded properly.Try print(test_img.shape) ;if it is None;then ensure that the test_img path in tester.py file is correct.

shubham-dixit commented 5 years ago

Yes, it did not print anything in the beginning and correcting path made it work fine, Thank you so much for help :)