Opencv 中的单应矩阵?
Homography matrix in Opencv?
In LATCH_match.cpp
in 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
in 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:
根据评论 by Catree the original dataset is at 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之间的单应性
In LATCH_match.cpp
in 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
in 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:
根据评论
Homographies between image pairs included.
所以我认为存储在文件../data/H1to3p.xml
中的单应性是图像1和图像3之间的单应性