解决opencv:error: (-215:Assertion failed) VScn::contains(scn) && VDcn::contains(dcn) &&VDepth::contai

error: (-215:Assertion failed) VScn::contains(scn) && VDcn::contains(dcn) && VDepth::contains(depth) in function 'cv::CvtHelper,struct cv::Set<1,-1,-1>,struct cv::Set<0,2,5>,2>::CvtHelper'

 这个报错一般是读取错误,一般是读取的路径有误,比较常见

如:

model_img = cv2.imread('..images/alphabets/A.jpg')

改成:

model_img = cv2.imread('../images/alphabets/A.jpg')

注意细节!!!

你可能感兴趣的:(计算机视觉,乱七八糟的bug)