Today We are Going To Solve OpenCV(4.1.2) error: (-215:Assertion failed) !ssize.empty() in function ‘cv::resize’ in Python. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.
Contents
How to Fix OpenCV(4.1.2) error: (-215:Assertion failed) !ssize.empty() in function ‘cv::resize’ Error?
- How to Fix OpenCV(4.1.2) error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize' Error?
To Fix OpenCV(4.1.2) error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize' Error just Use the below code. To solve this error you can try the below code
img=cv2.imread(filename) try: img = cv2.resize(img, (1400, 1000), interpolation=cv2.INTER_AREA) print(img.shape) except: break height, width , layers = img.shape size=(width,height)
- OpenCV(4.1.2) error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
To Fix OpenCV(4.1.2) error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize' Error just Use the below code. To solve this error you can try the below code
img=cv2.imread(filename) try: img = cv2.resize(img, (1400, 1000), interpolation=cv2.INTER_AREA) print(img.shape) except: break height, width , layers = img.shape size=(width,height)
Solution 1 : Use the below code
To solve this error you can try the below code
img=cv2.imread(filename)
try:
img = cv2.resize(img, (1400, 1000), interpolation=cv2.INTER_AREA)
print(img.shape)
except:
break
height, width , layers = img.shape
size=(width,height)
Conclusion
So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.
Also Read These Solutions
- OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
- ESLint: Component definition is missing displayName (react/display-name)
- “IsADirectoryError: [Errno 21] Is a directory: It is a file”
- SyntaxError: import declarations may only appear at top level of a module
- TypeError: firebase.auth is not a function