src_depth != CV_16F && src_depth != CV_32S
image = image.astype(np.uint8)
src_depth != CV_16F && src_depth != CV_32S
image = image.astype(np.uint8)
error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
This error happened because the image didn't load properly.
So you have problem with the previous line cv2.imread my suggestion is :
check if the images exist in the path you give
check the count variable if he have valid number
(-215:Assertion failed) img.type() == CV_8UC1 in func
img_blur = cv2.medianBlur(self.cropped_img,5).astype('uint8')
img_thresh_Gaussian = cv2.adaptiveThreshold(img_blur, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 2)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us