backgroundRemoval
backgroundRemoval copied to clipboard
It closes after a while ( (-215:Assertion failed) !ssize.empty() in function 'resize)
Hello, it works very well, but after a moment it suddenly gets closed. I guess there is something that cannot resize.
---------------------------------------------------------------------------
error Traceback (most recent call last)
<ipython-input-4-bb9cd1c7ef7c> in <module>
18 success, img = video.read()
19 success2, bg = oceanVideo.read()
---> 20 bg = resize(bg,ref_img)
21 if flag==0:
22 ref_img = img
<ipython-input-4-bb9cd1c7ef7c> in resize(dst, img)
7 height = img.shape[0]
8 dim = (width, height)
----> 9 resized = cv2.resize(dst, dim, interpolation = cv2.INTER_AREA)
10 return resized
11
error: OpenCV(4.2.0) /io/opencv/modules/imgproc/src/resize.cpp:4045: error: (-215:Assertion failed) !ssize.empty() in function 'resize'