opencv(4.5.1) c:\users\appveyor\appdata\local\temp\1\pip-req-build-kh7iq4w7\opencv\modules\imgproc\src\resize.cpp:4051: error: (-215:assertion failed) !ssize.empty() in function code example
Example 1: opencv(4.5.1) c:\users\appveyor\appdata\local\temp\1\pip-req-build-kh7iq4w7\opencv\modules\imgproc\src\resize.cpp:4051: error: (-215:assertion failed) !ssize.empty() in function
frame = cv2.resize(frame,(224,224),fx=0,fy=0, interpolation = cv2.INTER_CUBIC)
Example 2: opencv(4.5.1) c:\users\appveyor\appdata\local\temp\1\pip-req-build-kh7iq4w7\opencv\modules\imgproc\src\resize.cpp:4051: error: (-215:assertion failed) !ssize.empty() in function
Error Message:::::
error Traceback (most recent call last)
in
1 # read the image and resize it to a fixed-size
2 image = cv2.imread(file)
----> 3 image = cv2.resize(image, fixed_size)
error: OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:3720: error: (-215:Assertion failed) !ssize.empty() in function ‘cv::resize’
The Code:::
read the image and resize it to a fixed-size
image = cv2.imread(file)
image = cv2.resize(image, fixed_size)