Classification is one of the major problems that we solve while working on standard business problems across industries. In this article we’ll be discussing the major three of the many techniques used for the same, Logistic Regression, Decision Trees…
工业相机拍摄的图像中,由于摄像质量的限制,图像中的直线经过处理后,会表现出比较严重的锯齿.在这种情况下求取直线的倾角(其实就是直线的斜率),如果是直接选取直线的开始点和结束点来计算,或是用opencv自带的哈夫曼直线方法,都会引起较大的角度偏差,一般会达到好几度.误差这么大,显然达不到工控要求.后来尝试采取直线点集做最小二乘拟合,误差缩小到0.5以下.以下是算法的代码: //最小二乘拟合计算直线的倾角 int pointCount = pointVect.size(); if (pointCou…