OpenCV Assertion failed: (-215:Assertion failed) npoints >= 0 && (depth == CV_32F || depth == CV_32S)

前端 未结 6 1001
天命终不由人
天命终不由人 2020-12-10 15:34

I have found the following code on this website:

import os
import os.path
import cv2
import glob
import imutils
CAPTCHA_IMAGE_FOLDER = \"generated_captcha_im         


        
6条回答
  •  無奈伤痛
    2020-12-10 16:09

    This is because of opencv-python version 4.0.0. If you want to fix this without changing your code then downgrade opencv-python to version 3.4.9.31

    • Uninstall opencv-python

      pip uninstall opencv-python

    • Install opencv-python==3.4.9.31

      pip install opencv-python==3.4.9.31

    If facing issue with function 'pointSetBoundingRect', you need to install 'opencv-python-headless'

    pip install opencv-python-headless==3.4.9.31
    

提交回复
热议问题