Horje
opencv(4.1.2) /io/opencv/modules/imgproc/src/resize.cpp:3720: error: (-215:assertion failed) !ssize.empty() in function 'resize' Code Example
OpenCV(4.5.4-dev) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\resize.cpp:4051: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
This error arises if you aren't giving the right path to the image, 
check extentions(.png, .jpg) 

if you are working on jupyter notebook on the folder C:/users/user 
and your desired image called Dog.png exists in C:/users/user/Folder

use this -
Image = cv2.imread("Folder/Dog.png",-1)
opencv(4.1.2) /io/opencv/modules/imgproc/src/resize.cpp:3720: error: (-215:assertion failed) !ssize.empty() in function 'resize'
Generally this problem occurs due to resizing of the image, I just apply try and catch statement for resizing the image so that any error handling. It is working fine and not getting error related to shape.

 img=cv2.imread(filename)
    print(img)
        try:
           img = cv2.resize(img, (1400, 1000), interpolation=cv2.INTER_AREA)
            print(img.shape)
        except:
        break
    height, width , layers = img.shape
    size=(width,height)
    print(size)




Cpp

Related
Linking OpenCV with cmake . Adding the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH doesn't work Code Example Linking OpenCV with cmake . Adding the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH doesn't work Code Example
waiting in a serial as the spool reflect the queue operation. Demonstrate Printer Behavior in context of Queue.Subject to the Scenario implement the Pop and Push Using C++. Code Example waiting in a serial as the spool reflect the queue operation. Demonstrate Printer Behavior in context of Queue.Subject to the Scenario implement the Pop and Push Using C++. Code Example
c++ program to convert fahrenheit to celsius Code Example c++ program to convert fahrenheit to celsius Code Example
cast c++ Code Example cast c++ Code Example
how to add c++14 in sublime text Code Example how to add c++14 in sublime text Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8