<OpenCv-Python>cv.convexityDefects函数返回defects时,调用defects.shape时报错的处理
cv.convexityDefects返回值的shape报错处理OpenCv有一个凸包缺陷检测的函数cv.convexityDefects,其官方示例如下:importcv2ascvimportnumpyasnpimg=cv.imread('star.jpg')img_gray=cv.cvtColor(img,cv.COLOR_BGR2GRAY)ret,thresh=cv.<