neha01/FaceRecognition

Error in printing faces_detected

shubham-dixit opened this issue · 2 comments

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)

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.

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