单应性到射影变换
我一直在试图弄清楚如何在两个平面之间获取单应性并将其转换为射影变换。 Matlab 自动执行此操作,但我一直在尝试弄清楚 matlab 如何实现转换。
I've been attempting to figure out how to take a homography between two planes and convert it into an projective transform. Matlab does this automatically, but I've been trying to figure out how matlab implements the conversion.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在 toolbox\images\images\maketform.m 中查看源代码
至少在编辑器中,您可以通过在函数名称上按 F4 来获取此代码。
You can look at the source code in toolbox\images\images\maketform.m
At least within the editor you can get to this by hitting F4 on the function name.
单应性是一种投影变换,它将线映射到线,保持交叉比,但不保持平行或其他相似性大小(角度、距离等)。
单应性可以表示为齐次 3x3 矩阵,并根据您的问题以许多(真的很多)不同的方式进行计算。
最典型的一种是确定两个平面之间的4点对应关系并使用直接线性变换(DLT)。 DLT 也有很多实现。如果您熟悉 OpenCV,您可以使用
cv::findHomography
轻松获得此类单应性矩阵(http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html?highlight=findhomography#findhomography)。一般来说,我建议您看一下 Hartley & 出版社的《Multiple View Geometry》一书。 Zisserman,详细解释了计算机视觉背景下的单应性概念。
A homography is a projective transform that maps lines to lines, keeps cross ratio, but does not keep parallelism or other similarity magnitudes (angles, distances, etc).
A homography can be expressed as a homogeneous 3x3 matrix, and computed in many (really, many) different ways according to your problem.
The most typical one is to determine 4 point correspondences between the two planes and use the Direct Linear Transform (DLT). There are also many implementations of the DLT. If you are familiar with OpenCV, you can easily obtain such homography matrix using
cv::findHomography
(http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html?highlight=findhomography#findhomography).In general, I recommend you to take a look to the "Multiple View Geometry" book from Hartley & Zisserman, which explain in detail the concept of homographies in the context of computer vision.