给下列代码添加上如果投影数据为0则中断的代码cvPoint2f convertPointconst pclPointXYZRGB& point return cvPoint2fpointx pointy; Fit ellipse using OpenCVcvRotatedRect fitEllipseconst pclPointCloudpclPointXYZRGBPtr& cloud Conv
在fitEllipse函数中添加以下代码:
if (points.size() == 0) { // 如果投影数据为0,则中断 return cv::RotatedRect(); }
原文地址: http://www.cveoy.top/t/topic/ii5V 著作权归作者所有。请勿转载和采集!