spmallick / learnopencv

Learn OpenCV : C++ and Python Examples
https://www.learnopencv.com/
21.25k stars 11.61k forks source link

error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:4045: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize' #420

Open sinchubhat opened 4 years ago

sinchubhat commented 4 years ago

I got the following error when I ran the "Creating a virtual pen and eraser" code.

error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:4045: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

brmarkus commented 4 years ago

Which "code" have you tried? The code embedded in the JupyterNotebook? In which section of the JupyterNotebook did the assertion occur? Did you run all the sections manually, from top to bottom? Have you followed "https://www.learnopencv.com/creating-a-virtual-pen-and-eraser-with-opencv/", especially the part with

Note: All these values of different thresholds that I’ve chosen will depend upon your environment so please tune them first, instead of trying to make my values work.