This is the error I get:
error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:3718: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
Already checked for corrupted files.
cat
is an array of 1000 images (RGB).
I am trying to compress these images to (50,50) grayscale.
def greyscale_compress(img):
new_img = cv2.resize(img, (50,50))
img_gray = cv2.cvtColor(new_img, cv2.COLOR_BGR2GRAY)
return img_gray
cat_bin = []
for i in range(0, 100):
cat_bin.append(greyscale_compress(cat[i]))
except
clause with a singlebreak