关于opencv的warpPerspective和perspectiveTransform实现原理的区别

2025-04-22 14:50:04
推荐回答(1个)
回答1:

代码较长不易呈现。图片拼接,图1为基准,变换图2。
cvGetPerspectiveTransform(InPut,OutPut,map_),求出透视变换map_矩阵(3*3)。再用cvWarpPerspective做透视变换。用cvWarpPerspective,输入的P1和dst不等大,为400*300和514*392。测试发现,矩阵等大时可以运行。