原理介绍
如上图所示,径向变换,其实质是将原图上的像素点相对于原点进行移动(靠近或拉远),移动的幅度与点到原点的距离r成正比。移动后的点可能不在像素点的正中心,需要插值。
离原点越近,移动幅度越小,变形也就越小;离原点越远,移动幅度越大,变形越大。
srcImg:源图像
dstImg:目标图像
disK:整体拉伸因子
fx:横向拉伸的因子(整体拉伸因子基础上再次叠加该因子)
fy:纵向拉伸的因子(整体拉伸因子基础上再次叠加该因子)
void DistortImage(Mat srcImg, Ma