OpenCV Error: (-215:Assertion failed) VScn::contains(scn) && VDcn::contains(dcn) && VDepth::contains(depth) in function 'CvtHelper'

后端 未结 4 2032
攒了一身酷
攒了一身酷 2020-12-20 13:02
Traceback (most recent call last):
File \"demo.py\", line 132, in 
     `result = find_strawberry(image)`
File \"demo.py\", line 63, in find_strawberry
`image = cv2.         


        
4条回答
  •  Happy的楠姐
    2020-12-20 13:26

    Just in case if anyone is still having the same error even after applying the above fix then do check the depth of your image i.e. Check whether the image is grayscale or colored since cv2.COLOR_BGR2GRAY cannot convert images that are already grayscale and thus throws up this error.

提交回复
热议问题