Skip to content

Task02 Михаил Митрофанов ИТМО#32

Open
mana8reak wants to merge 5 commits into
PhotogrammetryCourse:task02from
mana8reak:task02
Open

Task02 Михаил Митрофанов ИТМО#32
mana8reak wants to merge 5 commits into
PhotogrammetryCourse:task02from
mana8reak:task02

Conversation

@mana8reak
Copy link
Copy Markdown

@mana8reak mana8reak commented Mar 14, 2026

Перечислите идеи и коротко обозначьте мысли которые у вас возникали по мере выполнения задания, в частности попробуйте ответить на вопросы:

  1. Зачем фильтровать матчи, если потом мы запускаем устойчивый к выбросам RANSAC и отфильтровываем шумные сопоставления?

Потому что RANSAC нуждается в том, чтобы настоящие матчи преобладают над шумными. Если бы мы не фильтровали, то рансак не отличил бы настоящую гомографию от фейковой, потому что шумные матчи ей не подчиняются.

  1. Cluster filtering довольно хорошо работает и без Ratio test. Однако, если оставить только Cluster filtering, некоторые тесты начнут падать. Почему так происходит? В каких случаях наоборот, не хватает Ratio test и необходима дополнительная фильтрация?

Cluster filtering, как я заметил, вообще не справляется с сильным изменением скейла. Видимо проблема в том, что кластеры матчей на большем изображении сжимаются в меньшее количество на другом и фильтр считает их ложными.

Ratio показался мне более стабильным, но я думаю он может сломаться на каких нибудь изображениях с повторяющимся паттерном, типо кирпичной стены с одинаковыми кирпичами. Он может просто отбросить почти все хорошие матчи, потому что у них наверняка будут похожие.

  1. С какой проблемой можно столкнуться при приравнивании единице элемента H33 матрицы гомографии? Как ее решить?

Мы перестанем учитывать масштаб картинок друг относительно друга? Решить можно будет нормированием большей матрицы, чтобы их H33 стали равны.

  1. Какой подвох таится в попытке склеивать большие панорамы и ортофото методом, реализованным в данной домашке? (Для интуиции можно посмотреть на результат склейки, когда за корень взята какая-нибудь другая картинка)

Во первых, наверное, ошибка будет накапливаться, особенно если есть много каких то поверхностей с повторяющейся геометрией. Мы же считаем гомографию для каждых двух картинок отдельно. Еще, если посмотреть, что будет, если сделать корнем 3 картинку, то можно увидеть, что из за неидеального угла обзора камеры картинка сверху начинает прилично вытягиваться и сжиматься. Думаю, что при больших панорамах этот эффект будет усиливаться, накапливая деформацию изображения.

  1. Как можно автоматически построить граф для построения панорамы, чтобы на вход метод принимал только список картинок?

Ну кажется можно просто попробовать поматчить каждую картинку с каждой, например, нашим матчером, и сделать ребрами графа пары картинок с каким то приемлемым числом матчей

  1. Если с вашей реализацией SIFT пройти тесты не получилось, напишите (если пробовали дебажить), где, как вам кажется, проблема и как вы пробовали ее решать.

Получилось

  1. Если есть, фидбек по заданию: какая часть больше всего понравилась, где-то слишком сложно/просто (что именно), где-то слишком мало ссылок и тд.

Как работает матрица гомографии не очень понятно из-за не очень хорошего понимания линала (а хотелось бы понимать), но в целом дз можно написать без этого. В этой дз, в отличие от прошлой, как будто не обязательно понимать весь код, чтобы его выполнить. Местами мне было просто лень разбираться (например, код метода гаусса), а дз не обязывает это делать (для меня это скорее минус).

С другой стороны, дебаг был очень мучительным и занял у меня несколько дней. Я не всегда вообще понимал, что от меня хочет тест из за запутанности кода. Например, очень долго пытался починить тест на scale50 и думал что проблема в кластер фильтре (он выдавал очень мало матчей (да, я не прочитал 2 вопрос и не думал о том что он сам по себе работает плохо)), чтобы потом обнаружить что надо просто поменять константу в ratio тесте на 0.05.

// Создайте PR.
// Дождитесь отработки Github Actions CI, после чего нажмите на зеленую галочку -> Details -> The build -> скопируйте весь лог тестирования.
// Откройте PR на редактирование (сверху справа три точки->Edit) и добавьте сюда скопированный лог тестирования внутри тега

 для сохранения форматирования и под спойлером для компактности и удобства:

Github Actions CI

Running main() from /home/runner/work/PhotogrammetryTasks2026/PhotogrammetryTasks2026/libs/3rdparty/libgtest/googletest/src/gtest_main.cc
[==========] Running 20 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 18 tests from MATCHING
[ RUN      ] MATCHING.SimpleStitching
testing sift detector/descriptor...
estimateHomographyRANSAC : support: 1007/1007
estimateHomographyRANSAC : best support: 1007/1007
keypoints RMSE: 0.242999, color RMSE: 9.33425
testing my detector/descriptor...
estimateHomographyRANSAC : support: 435/819
estimateHomographyRANSAC : support: 756/819
estimateHomographyRANSAC : support: 819/819
estimateHomographyRANSAC : best support: 819/819
keypoints RMSE: 0.136731, color RMSE: 5.6938
[       OK ] MATCHING.SimpleStitching (1338 ms)
[ RUN      ] MATCHING.SimpleMatching
testing sift detector/descriptor...
flann matching...
cv flann matching...
brute force matching
BruteforceMatcher::knnMatch : n query desc : 3919, n train desc : 3522
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 1004/1004
estimateHomographyRANSAC : best support: 1004/1004
evaluating homography...
nn_score: 0.639959, nn2_score: 0.308242, nn_score_cv: 0.612146, nn2_score_cv: 0.277622, time_my: 0.08755, time_cv: 0.078413, time_bruteforce: 4.51946, good_nn: 0.253126, good_ratio: 0.955556, good_clusters: 0.971667, good_ratio_and_clusters: 0.979084
testing my detector/descriptor...
flann matching...
cv flann matching...
brute force matching
BruteforceMatcher::knnMatch : n query desc : 3429, n train desc : 3135
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 819/819
estimateHomographyRANSAC : best support: 819/819
evaluating homography...
nn_score: 0.64392, nn2_score: 0.308836, nn_score_cv: 0.612715, nn2_score_cv: 0.267133, time_my: 0.076033, time_cv: 0.068724, time_bruteforce: 3.55381, good_nn: 0.240012, good_ratio: 0.965721, good_clusters: 0.992381, good_ratio_and_clusters: 0.992674
[       OK ] MATCHING.SimpleMatching (9736 ms)
[ RUN      ] MATCHING.Rotate10
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 756/759
estimateHomographyRANSAC : support: 757/759
estimateHomographyRANSAC : support: 758/759
estimateHomographyRANSAC : best support: 758/759
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.114415, time_cv: 0.102413, time_bruteforce: 0, good_nn: 0.191886, good_ratio: 0.928662, good_clusters: 0.956044, good_ratio_and_clusters: 0.951252
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 342/674
estimateHomographyRANSAC : support: 586/674
estimateHomographyRANSAC : support: 669/674
estimateHomographyRANSAC : support: 672/674
estimateHomographyRANSAC : support: 673/674
gauss: infinitely many solutions found
gauss: xs0: 622.044, 784.656, 615.482, 622.044, 
gauss: ys0: 596.117, 349.964, 379.981, 596.117, 
estimateHomographyRANSAC : best support: 673/674
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.101914, time_cv: 0.093719, time_bruteforce: 0, good_nn: 0.195392, good_ratio: 0.906648, good_clusters: 0.924119, good_ratio_and_clusters: 0.945104
[       OK ] MATCHING.Rotate10 (2250 ms)
[ RUN      ] MATCHING.Rotate20
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 761/762
estimateHomographyRANSAC : support: 762/762
estimateHomographyRANSAC : best support: 762/762
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.108717, time_cv: 0.0996, time_bruteforce: 0, good_nn: 0.204134, good_ratio: 0.96875, good_clusters: 0.9599, good_ratio_and_clusters: 0.998688
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 242/669
estimateHomographyRANSAC : support: 435/669
estimateHomographyRANSAC : support: 669/669
estimateHomographyRANSAC : best support: 669/669
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.100801, time_cv: 0.093076, time_bruteforce: 0, good_nn: 0.194226, good_ratio: 0.894437, good_clusters: 0.9175, good_ratio_and_clusters: 0.929746
[       OK ] MATCHING.Rotate20 (2192 ms)
[ RUN      ] MATCHING.Rotate30
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 576/751
estimateHomographyRANSAC : support: 750/751
estimateHomographyRANSAC : best support: 750/751
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.109209, time_cv: 0.099956, time_bruteforce: 0, good_nn: 0.19852, good_ratio: 0.966709, good_clusters: 0.968504, good_ratio_and_clusters: 0.989348
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 654/659
estimateHomographyRANSAC : support: 659/659
estimateHomographyRANSAC : best support: 659/659
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.102196, time_cv: 0.093822, time_bruteforce: 0, good_nn: 0.202975, good_ratio: 0.966423, good_clusters: 0.9729, good_ratio_and_clusters: 0.995448
[       OK ] MATCHING.Rotate30 (2189 ms)
[ RUN      ] MATCHING.Rotate40
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 349/751
estimateHomographyRANSAC : support: 747/751
estimateHomographyRANSAC : support: 751/751
estimateHomographyRANSAC : best support: 751/751
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.11034, time_cv: 0.100598, time_bruteforce: 0, good_nn: 0.190355, good_ratio: 0.935401, good_clusters: 0.949333, good_ratio_and_clusters: 0.961385
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 599/634
estimateHomographyRANSAC : support: 632/634
estimateHomographyRANSAC : support: 633/634
estimateHomographyRANSAC : support: 634/634
estimateHomographyRANSAC : best support: 634/634
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.101363, time_cv: 0.092686, time_bruteforce: 0, good_nn: 0.192476, good_ratio: 0.964724, good_clusters: 0.952522, good_ratio_and_clusters: 0.985804
[       OK ] MATCHING.Rotate40 (2193 ms)
[ RUN      ] MATCHING.Rotate45
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 760/761
gauss: infinitely many solutions found
gauss: xs0: 702.552, 555.232, 562.105, 555.232, 
gauss: ys0: 266.078, 502.92, 552.712, 502.92, 
estimateHomographyRANSAC : support: 761/761
estimateHomographyRANSAC : best support: 761/761
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.109763, time_cv: 0.100131, time_bruteforce: 0, good_nn: 0.169431, good_ratio: 0.832274, good_clusters: 0.844875, good_ratio_and_clusters: 0.856767
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 58/645
estimateHomographyRANSAC : support: 468/645
estimateHomographyRANSAC : support: 628/645
estimateHomographyRANSAC : support: 645/645
estimateHomographyRANSAC : best support: 645/645
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.101695, time_cv: 0.094061, time_bruteforce: 0, good_nn: 0.1986, good_ratio: 0.965672, good_clusters: 0.971264, good_ratio_and_clusters: 0.992248
[       OK ] MATCHING.Rotate45 (2214 ms)
[ RUN      ] MATCHING.Rotate90
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 510/832
estimateHomographyRANSAC : support: 831/832
estimateHomographyRANSAC : best support: 831/832
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.098238, time_cv: 0.088416, time_bruteforce: 0, good_nn: 0.216892, good_ratio: 0.97783, good_clusters: 0.988558, good_ratio_and_clusters: 0.99399
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 324/687
estimateHomographyRANSAC : support: 556/687
estimateHomographyRANSAC : support: 647/687
estimateHomographyRANSAC : support: 679/687
estimateHomographyRANSAC : support: 686/687
estimateHomographyRANSAC : support: 687/687
estimateHomographyRANSAC : best support: 687/687
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.090605, time_cv: 0.08315, time_bruteforce: 0, good_nn: 0.193059, good_ratio: 0.895688, good_clusters: 0.923313, good_ratio_and_clusters: 0.928675
[       OK ] MATCHING.Rotate90 (2052 ms)
[ RUN      ] MATCHING.Scale50
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 148/169
estimateHomographyRANSAC : support: 163/169
estimateHomographyRANSAC : support: 167/169
gauss: infinitely many solutions found
gauss: xs0: 630.44, 630.44, 773.357, 562.163, 
gauss: ys0: 416.798, 416.798, 429.043, 374.908, 
estimateHomographyRANSAC : best support: 167/169
too few matches: 6
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.057508, time_cv: 0.04831, time_bruteforce: 0, good_nn: 0.0405716, good_ratio: 0.777778, good_clusters: 0, good_ratio_and_clusters: 0.899408
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 72/118
estimateHomographyRANSAC : support: 116/118
estimateHomographyRANSAC : support: 118/118
estimateHomographyRANSAC : best support: 118/118
evaluating homography...
too few matches: 4
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.050539, time_cv: 0.043078, time_bruteforce: 0, good_nn: 0.0320793, good_ratio: 0.730496, good_clusters: 0, good_ratio_and_clusters: 0.864407
[       OK ] MATCHING.Scale50 (1154 ms)
[ RUN      ] MATCHING.Scale70
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 15/375
estimateHomographyRANSAC : support: 102/375
estimateHomographyRANSAC : support: 375/375
estimateHomographyRANSAC : best support: 375/375
evaluating homography...
too few matches: 30
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.07118, time_cv: 0.06143, time_bruteforce: 0, good_nn: 0.100791, good_ratio: 0.94015, good_clusters: 0, good_ratio_and_clusters: 0.994667
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 42/327
estimateHomographyRANSAC : support: 133/327
estimateHomographyRANSAC : support: 294/327
estimateHomographyRANSAC : support: 325/327
estimateHomographyRANSAC : support: 326/327
too few matches: 43
estimateHomographyRANSAC : best support: 326/327
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.063964, time_cv: 0.056409, time_bruteforce: 0, good_nn: 0.0974045, good_ratio: 0.926136, good_clusters: 0, good_ratio_and_clusters: 0.987768
[       OK ] MATCHING.Scale70 (1427 ms)
[ RUN      ] MATCHING.Scale90
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 635/654
estimateHomographyRANSAC : support: 652/654
estimateHomographyRANSAC : support: 653/654
estimateHomographyRANSAC : support: 654/654
estimateHomographyRANSAC : best support: 654/654
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.089551, time_cv: 0.079553, time_bruteforce: 0, good_nn: 0.170707, good_ratio: 0.967262, good_clusters: 0.979253, good_ratio_and_clusters: 0.987768
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 518/579
estimateHomographyRANSAC : support: 573/579
estimateHomographyRANSAC : support: 578/579
estimateHomographyRANSAC : best support: 578/579
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.081631, time_cv: 0.074587, time_bruteforce: 0, good_nn: 0.169729, good_ratio: 0.938538, good_clusters: 0.964427, good_ratio_and_clusters: 0.970639
[       OK ] MATCHING.Scale90 (1888 ms)
[ RUN      ] MATCHING.Scale110
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 366/787
estimateHomographyRANSAC : support: 708/787
estimateHomographyRANSAC : support: 787/787
estimateHomographyRANSAC : best support: 787/787
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.120021, time_cv: 0.109349, time_bruteforce: 0, good_nn: 0.210513, good_ratio: 0.979115, good_clusters: 0.986957, good_ratio_and_clusters: 0.997459
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 699/700
gauss: infinitely many solutions found
gauss: xs0: 689.839, 695.569, 701.79, 701.79, 
gauss: ys0: 620.743, 538.941, 511.049, 511.049, 
estimateHomographyRANSAC : best support: 699/700
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.110955, time_cv: 0.102053, time_bruteforce: 0, good_nn: 0.21114, good_ratio: 0.973648, good_clusters: 0.992167, good_ratio_and_clusters: 0.991429
[       OK ] MATCHING.Scale110 (2419 ms)
[ RUN      ] MATCHING.Scale130
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 778/839
estimateHomographyRANSAC : support: 780/839
estimateHomographyRANSAC : support: 838/839
gauss: infinitely many solutions found
gauss: xs0: 735.296, 576.892, 740.659, 735.296, 
gauss: ys0: 583.604, 595.147, 388.205, 583.604, 
estimateHomographyRANSAC : best support: 838/839
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.163503, time_cv: 0.153939, time_bruteforce: 0, good_nn: 0.217658, good_ratio: 0.956522, good_clusters: 0.98004, good_ratio_and_clusters: 0.986889
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 713/718
estimateHomographyRANSAC : support: 717/718
estimateHomographyRANSAC : best support: 717/718
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.154541, time_cv: 0.146638, time_bruteforce: 0, good_nn: 0.218139, good_ratio: 0.959839, good_clusters: 0.977995, good_ratio_and_clusters: 0.988858
[       OK ] MATCHING.Scale130 (3239 ms)
[ RUN      ] MATCHING.Scale150
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 674/792
estimateHomographyRANSAC : support: 717/792
estimateHomographyRANSAC : support: 790/792
estimateHomographyRANSAC : support: 791/792
gauss: infinitely many solutions found
gauss: xs0: 719.029, 576.309, 708.421, 576.309, 
gauss: ys0: 605.32, 607.281, 595.709, 607.281, 
estimateHomographyRANSAC : best support: 791/792
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.224841, time_cv: 0.214798, time_bruteforce: 0, good_nn: 0.195203, good_ratio: 0.918293, good_clusters: 0.961207, good_ratio_and_clusters: 0.945707
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 192/693
estimateHomographyRANSAC : support: 543/693
estimateHomographyRANSAC : support: 619/693
estimateHomographyRANSAC : support: 693/693
estimateHomographyRANSAC : best support: 693/693
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.214662, time_cv: 0.206, time_bruteforce: 0, good_nn: 0.194226, good_ratio: 0.907074, good_clusters: 0.92823, good_ratio_and_clusters: 0.932179
[       OK ] MATCHING.Scale150 (4331 ms)
[ RUN      ] MATCHING.Scale175
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 700/775
estimateHomographyRANSAC : support: 773/775
gauss: infinitely many solutions found
gauss: xs0: 767.455, 791.806, 723.539, 791.806, 
gauss: ys0: 603.38, 608.043, 488.056, 608.043, 
estimateHomographyRANSAC : best support: 773/775
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.293316, time_cv: 0.282258, time_bruteforce: 0, good_nn: 0.201072, good_ratio: 0.955112, good_clusters: 0.980349, good_ratio_and_clusters: 0.976774
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
gauss: infinitely many solutions found
estimating homography...
estimateHomographyRANSAC : support: 624/646
gauss: xs0: 791.556, 538.121, 617.484, 791.556, 
gauss: ys0: 607.793, 449.74, 492.694, 607.793, 
estimateHomographyRANSAC : support: 630/646
estimateHomographyRANSAC : support: 645/646
estimateHomographyRANSAC : best support: 645/646
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.278841, time_cv: 0.299482, time_bruteforce: 0, good_nn: 0.159522, good_ratio: 0.793462, good_clusters: 0.779661, good_ratio_and_clusters: 0.812693
[       OK ] MATCHING.Scale175 (5872 ms)
[ RUN      ] MATCHING.Scale200
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 774/856
estimateHomographyRANSAC : support: 854/856
estimateHomographyRANSAC : support: 855/856
gauss: infinitely many solutions found
gauss: xs0: 761.702, 772.61, 721.651, 721.651, 
gauss: ys0: 440.958, 554.465, 530.97, 530.97, 
estimateHomographyRANSAC : best support: 855/856
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.336249, time_cv: 0.317653, time_bruteforce: 0, good_nn: 0.217913, good_ratio: 0.953462, good_clusters: 0.97619, good_ratio_and_clusters: 0.971963
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 661/721
estimateHomographyRANSAC : support: 721/721
estimateHomographyRANSAC : best support: 721/721
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.307794, time_cv: 0.302117, time_bruteforce: 0, good_nn: 0.208516, good_ratio: 0.94086, good_clusters: 0.950562, good_ratio_and_clusters: 0.957004
[       OK ] MATCHING.Scale200 (6757 ms)
[ RUN      ] MATCHING.Rotate10Scale90
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 225/646
estimateHomographyRANSAC : support: 563/646
estimateHomographyRANSAC : support: 581/646
estimateHomographyRANSAC : support: 627/646
estimateHomographyRANSAC : support: 646/646
estimateHomographyRANSAC : best support: 646/646
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.09686, time_cv: 0.088416, time_bruteforce: 0, good_nn: 0.148507, good_ratio: 0.826087, good_clusters: 0.834646, good_ratio_and_clusters: 0.840557
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 161/548
estimateHomographyRANSAC : support: 540/548
estimateHomographyRANSAC : support: 546/548
estimateHomographyRANSAC : support: 547/548
gauss: infinitely many solutions found
gauss: xs0: 670.789, 637.405, 670.789, 695.642, 
gauss: ys0: 622.29, 560.821, 622.29, 380.372, 
estimateHomographyRANSAC : best support: 547/548
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.089313, time_cv: 0.081976, time_bruteforce: 0, good_nn: 0.144649, good_ratio: 0.835088, good_clusters: 0.852, good_ratio_and_clusters: 0.861314
[       OK ] MATCHING.Rotate10Scale90 (1984 ms)
[ RUN      ] MATCHING.Rotate30Scale75
testing sift detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 170/438
estimateHomographyRANSAC : support: 214/438
estimateHomographyRANSAC : support: 407/438
estimateHomographyRANSAC : support: 435/438
estimateHomographyRANSAC : support: 436/438
estimateHomographyRANSAC : best support: 436/438
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.08126, time_cv: 0.072063, time_bruteforce: 0, good_nn: 0.115846, good_ratio: 0.949115, good_clusters: 0.934066, good_ratio_and_clusters: 0.974886
testing my detector/descriptor...
flann matching...
cv flann matching...
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 372/374
estimateHomographyRANSAC : support: 373/374
estimateHomographyRANSAC : best support: 373/374
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.073023, time_cv: 0.0662, time_bruteforce: 0, good_nn: 0.0994459, good_ratio: 0.836788, good_clusters: 0.722222, good_ratio_and_clusters: 0.860963
[       OK ] MATCHING.Rotate30Scale75 (1595 ms)
[----------] 18 tests from MATCHING (54830 ms total)

[----------] 2 tests from STITCHING
[ RUN      ] STITCHING.SimplePanorama
estimateHomographyRANSAC : support: 782/1009
estimateHomographyRANSAC : support: 1006/1009
estimateHomographyRANSAC : support: 1007/1009
estimateHomographyRANSAC : best support: 1007/1009
bbox: [1284.14, 640.441], [0, -0.717842]
[       OK ] STITCHING.SimplePanorama (289 ms)
[ RUN      ] STITCHING.Orthophoto
estimateHomographyRANSAC : support: 104/1424
estimateHomographyRANSAC : support: 115/1424
estimateHomographyRANSAC : support: 287/1424
estimateHomographyRANSAC : support: 409/1424
estimateHomographyRANSAC : support: 514/1424
estimateHomographyRANSAC : support: 580/1424
gauss: infinitely many solutions found
gauss: xs0: 712.162, 180.778, 180.778, 155.366, 
gauss: ys0: 190.939, 192.402, 192.402, 46.1645, 
estimateHomographyRANSAC : best support: 580/1424
estimateHomographyRANSAC : support: 19/2163
estimateHomographyRANSAC : support: 25/2163
estimateHomographyRANSAC : support: 148/2163
estimateHomographyRANSAC : support: 349/2163
estimateHomographyRANSAC : support: 406/2163
estimateHomographyRANSAC : support: 456/2163
estimateHomographyRANSAC : support: 519/2163
estimateHomographyRANSAC : support: 550/2163
estimateHomographyRANSAC : support: 646/2163
estimateHomographyRANSAC : support: 710/2163
estimateHomographyRANSAC : best support: 710/2163
estimateHomographyRANSAC : support: 15/1103
estimateHomographyRANSAC : support: 122/1103
estimateHomographyRANSAC : support: 196/1103
estimateHomographyRANSAC : support: 260/1103
estimateHomographyRANSAC : support: 423/1103
estimateHomographyRANSAC : support: 444/1103
estimateHomographyRANSAC : support: 533/1103
estimateHomographyRANSAC : best support: 533/1103
estimateHomographyRANSAC : support: 393/1270
estimateHomographyRANSAC : support: 447/1270
estimateHomographyRANSAC : support: 581/1270
estimateHomographyRANSAC : support: 585/1270
estimateHomographyRANSAC : best support: 585/1270
bbox: [1310.37, 1565.28], [-158.66, -300.472]
estimateHomographyRANSAC : support: 98/1100
estimateHomographyRANSAC : support: 135/1100
estimateHomographyRANSAC : support: 310/1100
estimateHomographyRANSAC : support: 548/1100
gauss: infinitely many solutions found
gauss: xs0: 463.737, 294.097, 207.652, 294.097, 
gauss: ys0: 463.85, 620.065, 377.291, 620.065, 
estimateHomographyRANSAC : best support: 548/1100
estimateHomographyRANSAC : support: 277/1414
estimateHomographyRANSAC : support: 367/1414
estimateHomographyRANSAC : support: 611/1414
estimateHomographyRANSAC : best support: 611/1414
estimateHomographyRANSAC : support: 7/2158
estimateHomographyRANSAC : support: 103/2158
estimateHomographyRANSAC : support: 106/2158
estimateHomographyRANSAC : support: 350/2158
estimateHomographyRANSAC : support: 393/2158
estimateHomographyRANSAC : support: 736/2158
estimateHomographyRANSAC : best support: 736/2158
estimateHomographyRANSAC : support: 52/1268
estimateHomographyRANSAC : support: 73/1268
estimateHomographyRANSAC : support: 475/1268
estimateHomographyRANSAC : support: 518/1268
estimateHomographyRANSAC : support: 562/1268
estimateHomographyRANSAC : best support: 562/1268
bbox: [1269.29, 864], [-182.626, -946.569]
n stable ortho kpts: : 20950
[       OK ] STITCHING.Orthophoto (11733 ms)
[----------] 2 tests from STITCHING (12022 ms total)

[----------] Global test environment tear-down
[==========] 20 tests from 2 test suites ran. (66852 ms total)
[  PASSED  ] 20 tests

@simiyutin
Copy link
Copy Markdown
Contributor

Если бы мы не фильтровали, то рансак не отличил бы настоящую гомографию от фейковой

Вообще, отличил бы (даже если есть всего 10% инлаеров, то они все равно подчиняются одной гомографии, и почти всегда победят любую шумную гипотезу)
Но нужно было бы на порядки больше попыток, чтобы случайно попасть в нужную четверку матчей

@simiyutin
Copy link
Copy Markdown
Contributor

Мы перестанем учитывать масштаб картинок друг относительно друга? Решить можно будет нормированием большей матрицы, чтобы их H33 стали равны.

гомография работает в однородных координатах и ее можно спокойно умножать на ненулевую константу и ничего не изменится. но вот что если элемент H33 нулевой?

@simiyutin
Copy link
Copy Markdown
Contributor

Здравствуйте, все хорошо, но нет ответов на вопросы 4, 5

@mana8reak
Copy link
Copy Markdown
Author

Мы перестанем учитывать масштаб картинок друг относительно друга? Решить можно будет нормированием большей матрицы, чтобы их H33 стали равны.

гомография работает в однородных координатах и ее можно спокойно умножать на ненулевую константу и ничего не изменится. но вот что если элемент H33 нулевой?

Будет проблема с тем, что при нормировке значения матрицы просто взорвутся? Можно брать H33 как норму матрицы.

@mana8reak
Copy link
Copy Markdown
Author

mana8reak commented Mar 26, 2026

Здравствуйте, все хорошо, но нет ответов на вопросы 4, 5

Извиняюсь, я их почему-то просто проигнорировал. Сейчас добавил ответы. Прошу не давать штраф за дедлайн

@simiyutin
Copy link
Copy Markdown
Contributor

Можно брать H33 как норму матрицы.

не очень понял, матрица же как раз взорвется, если взять за норму нулевой H33

@mana8reak
Copy link
Copy Markdown
Author

Можно брать H33 как норму матрицы.

не очень понял, матрица же как раз взорвется, если взять за норму нулевой H33

Я бред какой то написал просто) Мы будем нормировать матрицу по H33, если он не близко к нулю, получая 1. Иначе можно делить на евклидову норму матрицы, чтобы избежать взрыва

@simiyutin
Copy link
Copy Markdown
Contributor

Иначе можно делить на евклидову норму матрицы, чтобы избежать взрыва

а как это поможет в решении системы методом гаусса?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants