gpt4 book ai didi

opencv - Opencv中的单应矩阵?

转载 作者:行者123 更新时间:2023-12-02 16:49:34 25 4
gpt4 key购买 nike

LATCH_match.cpp中的opencv_3.1.0中,单应性矩阵被定义并用作:

Mat homography;
FileStorage fs("../data/H1to3p.xml", FileStorage::READ);
...
fs.getFirstTopLevelNode() >> homography;
...
Mat col = Mat::ones(3, 1, CV_64F);
col.at<double>(0) = matched1[i].pt.x;
col.at<double>(1) = matched1[i].pt.y;
col = homography * col;
...

为什么 H1to3p.xml是:
<opencv_storage><H13 type_id="opencv-matrix"><rows>3</rows><cols>3</cols><dt>d</dt><data>
7.6285898e-01 -2.9922929e-01 2.2567123e+02
3.3443473e-01 1.0143901e+00 -7.6999973e+01
3.4663091e-04 -1.4364524e-05 1.0000000e+00 </data></H13></opencv_storage>

这些数字是根据哪些标准选择的?它们可以用于任何其他单应性测试以过滤关键点(如 LATCH_match.cpp)吗?

最佳答案

我假设您的“LATCH_match.cpp中的opencv_3.1.0”为
https://github.com/Itseez/opencv/blob/3.1.0/samples/cpp/tutorial_code/xfeatures2D/LATCH_match.cpp

在该文件中,您find:

// If you find this code useful, please add a reference to the following paper in your work:
// Gil Levi and Tal Hassner, "LATCH: Learned Arrangements of Three Patch Codes", arXiv preprint arXiv:1501.03719, 15 Jan. 2015

因此,查看 http://arxiv.org/pdf/1501.03719v1.pdf,您会发现

For each set, we compare the first image against each of the remaining five and check for correspondences. Performance is measured using the code from [16, 17]1 , which computes recall and 1-precision using known ground truth homographies between the images.



我认为图像 ../data/graf1.png是我在这里显示的 https://github.com/Itseez/opencv/blob/3.1.0/samples/data/graf1.png:

enter image description here

根据 Homography matrix in Opencv?Catree注释,原始数据集位于 http://www.robots.ox.ac.uk/~vgg/research/affine/det_eval_files/graf.tar.gz处,据说

Homographies between image pairs included.



因此,我认为存储在文件 ../data/H1to3p.xml中的单应性是图像1和图像3之间的单应性。

关于opencv - Opencv中的单应矩阵?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37564541/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com