OpenCV470 Daopencv-pythonopencv-pythonopencvmodulesimgprocsrcshapedescrcpp315 error -215Assertion failed npoints = 0 && depth == CV_32F depth == CV_32S in function cvcontourArea
This error occurs when the number of points in a contour is less than zero or the depth of the contour is not either CV_32F or CV_32S.
To fix this error, make sure that the contour being passed to the cv::contourArea function has a valid number of points and a valid depth. You can also try converting the contour to the correct depth using the cv::convertTo function.
原文地址: https://www.cveoy.top/t/topic/bNvE 著作权归作者所有。请勿转载和采集!