opencv-face-recognition-python icon indicating copy to clipboard operation
opencv-face-recognition-python copied to clipboard

OpenCV-Face-Recognition-Python.py, Line 223, in <Module>

Open tobimichigan opened this issue 6 years ago • 2 comments

OpenCV (3.4.1) Error: Assertion Failed <ssize.width> 0 && ssize.height > 0> in cv::resize, file resize.cpp, line 4044

OpenCV-Face-Recognition-Python.py, Line 223, in <Module> faces, labels = prepare_training_data("training-data")

File "OpenCV-Face-Recognition-Python.py, Line 178, in prepare_training_data cv2.imshow("Training on image...", cv2.resize<image, (400,500)))

cv2.imshow("Training on image...", cv2.resize(image, (400, 500))) cv2.error: OpenCV(3.4.1) resize.cpp:4044: error <215> ssize.width > 0 && ssize height > 0 in function cv::resize

Please is there a solution to this?

tobimichigan avatar Oct 07 '18 10:10 tobimichigan

Try using LBHP instead of eigen function

AyushTejwani avatar Oct 08 '18 20:10 AyushTejwani

The picture for testing also needs to be in your training set as well. There is no logic in place that deals with no match found so error will be reported.

ejlai avatar Jun 11 '19 18:06 ejlai