(-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

前端 未结 5 812
逝去的感伤
逝去的感伤 2020-12-19 00:54

I am trying to recognize text from an image to then have the text outputted; however, this error spits out:

Traceback (most recent call last):

5条回答
  •  甜味超标
    2020-12-19 01:09

    This error occurs when the image is in one format and in the python program you specify other format.

    Example:

    File Path= /home/user/image.jpg
    

    but in the python program you read the image as jpeg

    img = cv.imread("image.jpeg")
    

    Then you will be facing this error

提交回复
热议问题