opencv透视变换源码
代码说明:
//依据opencv源码改编而来,代码中已剔除opencv源码中优化部分 void MywarpPerspective(const Mat &_src, Mat &_dst, const Mat &_M0, Size dsize, int flags, int borderType, const Scalar& borderValue) { Mat src = _src, M0 = _M0; _dst.create(dsize.empty() ? src.size() : dsize, src.type()); Mat dst = _dst; if (dst.data == src.data) src = src.clone(); double M[9]; Mat matM(3, 3, CV_64F, M); int interpolation = flags & INTER_MAX; if (interpolation == INTER_AREA) interpolation = INTER_LINEAR; M0.convertTo(matM, matM.type()); for (int i = 0; i < roiPoints.size(); i++) { double X0 = M[0] * roiPoints[i].
下载说明:请别用迅雷下载,失败请重下,重下不扣分!