Skip to content

Task02 Василий Можаев СПбГУ #39

Open
mozhaa wants to merge 5 commits intoPhotogrammetryCourse:task02from
mozhaa:task02
Open

Task02 Василий Можаев СПбГУ #39
mozhaa wants to merge 5 commits intoPhotogrammetryCourse:task02from
mozhaa:task02

Conversation

@mozhaa
Copy link

@mozhaa mozhaa commented Mar 18, 2026

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

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

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

Например в случае повторяющейся текстуры на полу (пример с лекции): cluster filtering с радостью заматчит разные плитки пола с одинаковым рисунком, потому что они достаточно большие, на них много точек и все они большим кластером переходят в другую плитку. Здесь и нужен ratio-test, который увидит, что вообще-то тут много одинаковых плиток и лучше такое не матчить. Однако cluster filtering конечно тоже нужен, потому что он хорошо отсеивает выбросные матчи, потому что ratio-test их не отсеит если они достачно уникльные. В общем лучше совмещать такие алгоритмы, чтобы получать лучшие качества из каждого

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

Опять же на лекции был пример с фоткой рельс в перспективе, где видно точку горизонта (vanishing point), которая при матче с фоткой рельс сверху перейдет в бесконечно удаленную точку, а значит H33 = 0. В этом случае, если зафиксировать H33 = 1, то в решении получатся бесконечно огромные числа (чтобы скомпенсировать то, что H33 = 1 а не 0). На лекции предлагали решать через SVD вместо Гаусса

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

Я так понял тут подразумевается ответ "ошибки накапливаются, поэтому нужен bundle adjustment"

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

Ну видимо нужно поматчить какие-то картинки, посмотреть на матчи, соединить ребром хорошие пары картинок, там еще что-то поделать и в итоге получится какой-то граф. Короче использовать знания о "хорошести пары картинок" из того, какие у них матчи

Github Actions CI

[==========] 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: 383/1002
estimateHomographyRANSAC : support: 1002/1002
estimateHomographyRANSAC : best support: 1002/1002
keypoints RMSE: 0.363148, color RMSE: 13.9143
testing my detector/descriptor...
estimateHomographyRANSAC : support: 840/840
estimateHomographyRANSAC : best support: 840/840
keypoints RMSE: 0.261649, color RMSE: 9.51668
[       OK ] MATCHING.SimpleStitching (1353 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: 1003/1003
estimateHomographyRANSAC : best support: 1003/1003
evaluating homography...
nn_score: 0.61036, nn2_score: 0.270987, nn_score_cv: 0.614442, nn2_score_cv: 0.273794, time_my: 0.077979, time_cv: 0.077857, time_bruteforce: 4.47955, good_nn: 0.260526, good_ratio: 0.996055, good_clusters: 0.991582, good_ratio_and_clusters: 0.999003
testing my detector/descriptor...
flann matching...
cv flann matching...
brute force matching
BruteforceMatcher::knnMatch : n query desc : 3481, n train desc : 3119
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 840/840
estimateHomographyRANSAC : best support: 840/840
evaluating homography...
nn_score: 0.619362, nn2_score: 0.274346, nn_score_cv: 0.608159, nn2_score_cv: 0.27923, time_my: 0.068544, time_cv: 0.068892, time_bruteforce: 3.61495, good_nn: 0.245619, good_ratio: 0.9953, good_clusters: 0.990177, good_ratio_and_clusters: 1
[       OK ] MATCHING.SimpleMatching (9832 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: 736/738
estimateHomographyRANSAC : support: 738/738
estimateHomographyRANSAC : best support: 738/738
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.099234, time_cv: 0.099723, time_bruteforce: 0, good_nn: 0.192651, good_ratio: 0.961282, good_clusters: 0.97319, good_ratio_and_clusters: 0.966125
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: 650/651
estimateHomographyRANSAC : support: 651/651
estimateHomographyRANSAC : best support: 651/651
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.093272, time_cv: 0.093796, time_bruteforce: 0, good_nn: 0.196783, good_ratio: 0.957704, good_clusters: 0.955381, good_ratio_and_clusters: 0.963134
[       OK ] MATCHING.Rotate10 (2283 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: 617/740
estimateHomographyRANSAC : support: 700/740
estimateHomographyRANSAC : support: 740/740
estimateHomographyRANSAC : best support: 740/740
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.099761, time_cv: 0.099671, time_bruteforce: 0, good_nn: 0.181934, good_ratio: 0.903567, good_clusters: 0.866667, good_ratio_and_clusters: 0.910811
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: 631/666
estimateHomographyRANSAC : support: 666/666
estimateHomographyRANSAC : best support: 666/666
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.093349, time_cv: 0.094178, time_bruteforce: 0, good_nn: 0.205401, good_ratio: 0.997033, good_clusters: 0.969152, good_ratio_and_clusters: 0.996997
[       OK ] MATCHING.Rotate20 (2289 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: 657/726
estimateHomographyRANSAC : support: 695/726
estimateHomographyRANSAC : support: 700/726
estimateHomographyRANSAC : support: 715/726
estimateHomographyRANSAC : support: 718/726
estimateHomographyRANSAC : support: 723/726
estimateHomographyRANSAC : support: 725/726
gauss: infinitely many solutions found
gauss: xs0: 794.107, 794.107, 648.333, 594.97, 
gauss: ys0: 381.534, 381.534, 458.956, 435.448, 
gauss: infinitely many solutions found
gauss: xs0: 664.483, 630.44, 630.44, 588.127, 
gauss: ys0: 219.201, 416.798, 416.798, 516.617, 
gauss: infinitely many solutions found
gauss: xs0: 657.363, 657.363, 537.519, 791.806, 
gauss: ys0: 480.739, 480.739, 464.738, 608.043, 
gauss: infinitely many solutions found
gauss: xs0: 795.526, 733.297, 663.59, 733.297, 
gauss: ys0: 511.123, 424.265, 522.787, 424.265, 
gauss: infinitely many solutions found
gauss: xs0: 721.024, 734.888, 734.888, 606.244, 
gauss: ys0: 201.521, 472.16, 472.16, 476.591, 
estimateHomographyRANSAC : best support: 725/726
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.099824, time_cv: 0.099662, time_bruteforce: 0, good_nn: 0.198775, good_ratio: 0.994587, good_clusters: 0.983562, good_ratio_and_clusters: 0.997245
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: 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.093133, time_cv: 0.093692, time_bruteforce: 0, good_nn: 0.189313, good_ratio: 0.929985, good_clusters: 0.926829, good_ratio_and_clusters: 0.936533
[       OK ] MATCHING.Rotate30 (2293 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: 730/730
estimateHomographyRANSAC : best support: 730/730
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.099804, time_cv: 0.100484, time_bruteforce: 0, good_nn: 0.19852, good_ratio: 0.991914, good_clusters: 0.986945, good_ratio_and_clusters: 0.99589
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: 431/650
estimateHomographyRANSAC : support: 650/650
estimateHomographyRANSAC : best support: 650/650
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.093348, time_cv: 0.093521, time_bruteforce: 0, good_nn: 0.195633, good_ratio: 0.959153, good_clusters: 0.944767, good_ratio_and_clusters: 0.969231
[       OK ] MATCHING.Rotate40 (2287 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: 719/731
estimateHomographyRANSAC : support: 729/731
estimateHomographyRANSAC : support: 730/731
estimateHomographyRANSAC : support: 731/731
estimateHomographyRANSAC : best support: 731/731
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.101507, time_cv: 0.100175, time_bruteforce: 0, good_nn: 0.161776, good_ratio: 0.818059, good_clusters: 0.807692, good_ratio_and_clusters: 0.827633
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: 607/650
estimateHomographyRANSAC : support: 611/650
estimateHomographyRANSAC : support: 631/650
estimateHomographyRANSAC : support: 650/650
estimateHomographyRANSAC : best support: 650/650
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.094694, time_cv: 0.09446, time_bruteforce: 0, good_nn: 0.199368, good_ratio: 0.96988, good_clusters: 0.961853, good_ratio_and_clusters: 0.973846
[       OK ] MATCHING.Rotate45 (2280 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: 817/817
estimateHomographyRANSAC : best support: 817/817
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.089143, time_cv: 0.088701, time_bruteforce: 0, good_nn: 0.216892, good_ratio: 0.995187, good_clusters: 0.98861, good_ratio_and_clusters: 0.997552
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: 508/730
estimateHomographyRANSAC : support: 730/730
estimateHomographyRANSAC : best support: 730/730
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.082643, time_cv: 0.083163, time_bruteforce: 0, good_nn: 0.210284, good_ratio: 0.94094, good_clusters: 0.944568, good_ratio_and_clusters: 0.954795
[       OK ] MATCHING.Rotate90 (2134 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: 85/154
estimateHomographyRANSAC : support: 106/154
estimateHomographyRANSAC : support: 154/154
estimateHomographyRANSAC : best support: 154/154
evaluating homography...
too few matches: 1
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.048989, time_cv: 0.048009, time_bruteforce: 0, good_nn: 0.0438887, good_ratio: 0.9625, good_clusters: 0, good_ratio_and_clusters: 0.993506
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: 111/124
estimateHomographyRANSAC : support: 124/124
estimateHomographyRANSAC : best support: 124/124
evaluating homography...
too few matches: 0
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.044081, time_cv: 0.043127, time_bruteforce: 0, good_nn: 0.0422292, good_ratio: 0.96875, good_clusters: 0, good_ratio_and_clusters: 0.991935
[       OK ] MATCHING.Scale50 (1210 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: 362/362
too few matches: 32
estimateHomographyRANSAC : best support: 362/362
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.061739, time_cv: 0.060959, time_bruteforce: 0, good_nn: 0.100281, good_ratio: 0.989101, good_clusters: 0, good_ratio_and_clusters: 0.997238
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: 111/328
estimateHomographyRANSAC : support: 307/328
estimateHomographyRANSAC : support: 328/328
estimateHomographyRANSAC : best support: 328/328
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.056603, time_cv: 0.056484, time_bruteforce: 0, good_nn: 0.100259, good_ratio: 0.979104, good_clusters: 1, good_ratio_and_clusters: 0.990854
[       OK ] MATCHING.Scale70 (1513 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: 12/639
estimateHomographyRANSAC : support: 639/639
estimateHomographyRANSAC : best support: 639/639
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.080486, time_cv: 0.079915, time_bruteforce: 0, good_nn: 0.172493, good_ratio: 0.993808, good_clusters: 0.99177, good_ratio_and_clusters: 0.995305
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: 55/581
estimateHomographyRANSAC : support: 581/581
estimateHomographyRANSAC : best support: 581/581
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.073756, time_cv: 0.073824, time_bruteforce: 0, good_nn: 0.175812, good_ratio: 0.983022, good_clusters: 0.925197, good_ratio_and_clusters: 0.987952
[       OK ] MATCHING.Scale90 (1993 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: 719/766
estimateHomographyRANSAC : support: 766/766
estimateHomographyRANSAC : best support: 766/766
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.109543, time_cv: 0.109109, time_bruteforce: 0, good_nn: 0.196989, good_ratio: 0.94095, good_clusters: 0.957871, good_ratio_and_clusters: 0.947781
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: 148/689
estimateHomographyRANSAC : support: 672/689
estimateHomographyRANSAC : support: 689/689
estimateHomographyRANSAC : best support: 689/689
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.104021, time_cv: 0.103629, time_bruteforce: 0, good_nn: 0.210859, good_ratio: 0.998565, good_clusters: 0.992366, good_ratio_and_clusters: 0.998549
[       OK ] MATCHING.Scale110 (2527 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: 758/821
estimateHomographyRANSAC : support: 797/821
estimateHomographyRANSAC : support: 821/821
estimateHomographyRANSAC : best support: 821/821
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.155048, time_cv: 0.153733, time_bruteforce: 0, good_nn: 0.218933, good_ratio: 0.991627, good_clusters: 0.992141, good_ratio_and_clusters: 0.99391
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: 462/720
estimateHomographyRANSAC : support: 668/720
estimateHomographyRANSAC : support: 720/720
estimateHomographyRANSAC : best support: 720/720
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.146786, time_cv: 0.147199, time_bruteforce: 0, good_nn: 0.226659, good_ratio: 0.993197, good_clusters: 0.993603, good_ratio_and_clusters: 0.997222
[       OK ] MATCHING.Scale130 (3374 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: 72/768
estimateHomographyRANSAC : support: 524/768
estimateHomographyRANSAC : support: 765/768
estimateHomographyRANSAC : support: 766/768
estimateHomographyRANSAC : support: 767/768
gauss: infinitely many solutions found
gauss: xs0: 599.95, 599.95, 775.333, 781.73, 
gauss: ys0: 525.492, 525.492, 590.137, 418.938, 
estimateHomographyRANSAC : best support: 767/768
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.21595, time_cv: 0.216982, time_bruteforce: 0, good_nn: 0.202092, good_ratio: 0.96927, good_clusters: 0.974895, good_ratio_and_clusters: 0.977865
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: 261/691
estimateHomographyRANSAC : support: 564/691
estimateHomographyRANSAC : support: 691/691
estimateHomographyRANSAC : best support: 691/691
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.205899, time_cv: 0.207367, time_bruteforce: 0, good_nn: 0.201092, good_ratio: 0.961318, good_clusters: 0.940299, good_ratio_and_clusters: 0.966715
[       OK ] MATCHING.Scale150 (4479 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: 655/754
estimateHomographyRANSAC : support: 660/754
estimateHomographyRANSAC : support: 752/754
estimateHomographyRANSAC : support: 753/754
gauss: infinitely many solutions found
gauss: xs0: 688.902, 554.544, 806.189, 688.902, 
gauss: ys0: 353.54, 557.898, 430.847, 353.54, 
gauss: infinitely many solutions found
gauss: xs0: 665.122, 665.122, 661.332, 782.914, 
gauss: ys0: 609.679, 609.679, 456.622, 227.669, 
gauss: infinitely many solutions found
gauss: xs0: 563.681, 758.506, 586.909, 586.909, 
gauss: ys0: 601.072, 511.024, 516.331, 516.331, 
estimateHomographyRANSAC : best support: 753/754
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.278148, time_cv: 0.276625, time_bruteforce: 0, good_nn: 0.196734, good_ratio: 0.960836, good_clusters: 0.965443, good_ratio_and_clusters: 0.969496
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: 417/643
estimateHomographyRANSAC : support: 642/643
gauss: infinitely many solutions found
gauss: xs0: 690.97, 658.049, 645.144, 690.97, 
gauss: ys0: 571.809, 506.04, 546.047, 571.809, 
estimateHomographyRANSAC : best support: 642/643
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.270129, time_cv: 0.268536, time_bruteforce: 0, good_nn: 0.195633, good_ratio: 0.960366, good_clusters: 0.959036, good_ratio_and_clusters: 0.968896
[       OK ] MATCHING.Scale175 (5967 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: 147/848
estimateHomographyRANSAC : support: 711/848
estimateHomographyRANSAC : support: 718/848
estimateHomographyRANSAC : support: 806/848
estimateHomographyRANSAC : support: 844/848
estimateHomographyRANSAC : support: 846/848
estimateHomographyRANSAC : support: 847/848
gauss: infinitely many solutions found
gauss: xs0: 700.173, 700.173, 623.306, 691.449, 
gauss: ys0: 580.667, 580.667, 562.212, 457.412, 
estimateHomographyRANSAC : best support: 847/848
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.333503, time_cv: 0.322972, time_bruteforce: 0, good_nn: 0.220209, good_ratio: 0.981395, good_clusters: 0.989031, good_ratio_and_clusters: 0.985849
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: 523/764
estimateHomographyRANSAC : support: 762/764
estimateHomographyRANSAC : support: 764/764
estimateHomographyRANSAC : best support: 764/764
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.299846, time_cv: 0.295845, time_bruteforce: 0, good_nn: 0.230106, good_ratio: 0.990968, good_clusters: 0.981343, good_ratio_and_clusters: 0.990838
[       OK ] MATCHING.Scale200 (6942 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: 20/612
estimateHomographyRANSAC : support: 607/612
estimateHomographyRANSAC : support: 612/612
estimateHomographyRANSAC : best support: 612/612
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.089281, time_cv: 0.088422, time_bruteforce: 0, good_nn: 0.162541, good_ratio: 0.935588, good_clusters: 0.941667, good_ratio_and_clusters: 0.936275
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: 555/555
estimateHomographyRANSAC : best support: 555/555
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.083066, time_cv: 0.083069, time_bruteforce: 0, good_nn: 0.172077, good_ratio: 0.976868, good_clusters: 0.956364, good_ratio_and_clusters: 0.976577
[       OK ] MATCHING.Rotate10Scale90 (2107 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: 286/413
estimateHomographyRANSAC : support: 382/413
estimateHomographyRANSAC : support: 407/413
estimateHomographyRANSAC : support: 411/413
gauss: infinitely many solutions found
gauss: xs0: 723.539, 602.078, 723.539, 697.689, 
gauss: ys0: 488.056, 565.127, 488.056, 456.498, 
gauss: infinitely many solutions found
gauss: xs0: 733.297, 635.544, 733.297, 538.371, 
gauss: ys0: 424.265, 620.075, 424.265, 449.99, 
gauss: infinitely many solutions found
gauss: xs0: 787.925, 776.028, 730.595, 787.925, 
gauss: ys0: 614.907, 462.516, 492.599, 614.907, 
gauss: infinitely many solutions found
gauss: xs0: 764.491, 589.548, 543.996, 589.548, 
gauss: ys0: 449.326, 502.858, 543.135, 502.858, 
gauss: infinitely many solutions found
gauss: xs0: 773.672, 665.122, 665.122, 547.352, 
gauss: ys0: 315.408, 609.679, 609.679, 447.898, 
gauss: infinitely many solutions found
gauss: xs0: 598.737, 555.59, 598.737, 667.328, 
gauss: ys0: 462.817, 535.099, 462.817, 455.62, 
estimateHomographyRANSAC : best support: 411/413
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.073208, time_cv: 0.072434, time_bruteforce: 0, good_nn: 0.117122, good_ratio: 0.983254, good_clusters: 0.967391, good_ratio_and_clusters: 0.990315
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: 354/372
estimateHomographyRANSAC : support: 372/372
estimateHomographyRANSAC : best support: 372/372
evaluating homography...
nn_score: 0, nn2_score: 0, nn_score_cv: 0, nn2_score_cv: 0, time_my: 0.066747, time_cv: 0.066498, time_bruteforce: 0, good_nn: 0.118931, good_ratio: 0.963158, good_clusters: 0.913043, good_ratio_and_clusters: 0.981183
[       OK ] MATCHING.Rotate30Scale75 (1682 ms)
[----------] 18 tests from MATCHING (56545 ms total)

[----------] 2 tests from STITCHING
[ RUN      ] STITCHING.SimplePanorama
estimateHomographyRANSAC : support: 986/998
estimateHomographyRANSAC : support: 996/998
estimateHomographyRANSAC : support: 997/998
gauss: infinitely many solutions found
gauss: xs0: 151.762, 215.975, 44.2744, 44.2744, 
gauss: ys0: 456.145, 588.039, 570.666, 570.666, 
gauss: infinitely many solutions found
gauss: xs0: 50.322, 167.772, 167.772, 208.183, 
gauss: ys0: 607.325, 636.46, 636.46, 622.788, 
estimateHomographyRANSAC : best support: 997/998
bbox: [1286.52, 641.766], [0, -5.73245]
[       OK ] STITCHING.SimplePanorama (297 ms)
[ RUN      ] STITCHING.Orthophoto
estimateHomographyRANSAC : support: 36/1036
estimateHomographyRANSAC : support: 261/1036
estimateHomographyRANSAC : support: 301/1036
estimateHomographyRANSAC : support: 404/1036
estimateHomographyRANSAC : support: 428/1036
estimateHomographyRANSAC : support: 450/1036
estimateHomographyRANSAC : support: 457/1036
estimateHomographyRANSAC : support: 461/1036
estimateHomographyRANSAC : support: 504/1036
gauss: infinitely many solutions found
gauss: xs0: 623.901, 587.665, 205.003, 623.901, 
gauss: ys0: 150.025, 37.0655, 473.118, 150.025, 
estimateHomographyRANSAC : best support: 504/1036
estimateHomographyRANSAC : support: 332/1566
estimateHomographyRANSAC : support: 348/1566
estimateHomographyRANSAC : support: 549/1566
estimateHomographyRANSAC : support: 563/1566
estimateHomographyRANSAC : best support: 563/1566
estimateHomographyRANSAC : support: 33/904
estimateHomographyRANSAC : support: 445/904
estimateHomographyRANSAC : support: 451/904
estimateHomographyRANSAC : support: 462/904
estimateHomographyRANSAC : support: 494/904
estimateHomographyRANSAC : best support: 494/904
estimateHomographyRANSAC : support: 259/775
estimateHomographyRANSAC : support: 320/775
estimateHomographyRANSAC : support: 382/775
estimateHomographyRANSAC : support: 386/775
estimateHomographyRANSAC : support: 396/775
estimateHomographyRANSAC : support: 422/775
estimateHomographyRANSAC : support: 444/775
estimateHomographyRANSAC : support: 453/775
estimateHomographyRANSAC : support: 466/775
estimateHomographyRANSAC : best support: 466/775
bbox: [1310.72, 1685.07], [-195.435, -326.975]
estimateHomographyRANSAC : support: 87/793
estimateHomographyRANSAC : support: 184/793
estimateHomographyRANSAC : support: 204/793
estimateHomographyRANSAC : support: 266/793
estimateHomographyRANSAC : support: 372/793
estimateHomographyRANSAC : support: 420/793
gauss: infinitely many solutions found
gauss: xs0: 711.474, 176.383, 313.22, 176.383, 
gauss: ys0: 718.504, 404.468, 620, 404.468, 
estimateHomographyRANSAC : support: 445/793
estimateHomographyRANSAC : support: 446/793
gauss: infinitely many solutions found
gauss: xs0: 163.343, 205.453, 205.453, 312.129, 
gauss: ys0: 609.9, 619.707, 619.707, 635.525, 
gauss: infinitely many solutions found
gauss: xs0: 627.287, 588.453, 588.453, 632.907, 
gauss: ys0: 659.509, 551.769, 551.769, 554.458, 
estimateHomographyRANSAC : support: 453/793
estimateHomographyRANSAC : best support: 453/793
estimateHomographyRANSAC : support: 118/1029
estimateHomographyRANSAC : support: 162/1029
estimateHomographyRANSAC : support: 165/1029
estimateHomographyRANSAC : support: 224/1029
estimateHomographyRANSAC : support: 458/1029
estimateHomographyRANSAC : support: 520/1029
gauss: infinitely many solutions found
estimateHomographyRANSAC : support: 525/1029
gauss: xs0: 110.22, 618.664, 618.664, 583.541, 
gauss: ys0: 828.641, 380.313, 380.313, 635.082, 
gauss: infinitely many solutions found
gauss: xs0: 339.091, 977.098, 736.049, 977.098, 
gauss: ys0: 260.138, 361.452, 282.189, 361.452, 
estimateHomographyRANSAC : support: 542/1029
estimateHomographyRANSAC : best support: 542/1029
estimateHomographyRANSAC : support: 75/1557
estimateHomographyRANSAC : support: 105/1557
estimateHomographyRANSAC : support: 123/1557
estimateHomographyRANSAC : support: 467/1557
estimateHomographyRANSAC : support: 554/1557
gauss: infinitely many solutions found
gauss: xs0: 1032.27, 1032.27, 311.738, 239.756, 
gauss: ys0: 271.58, 271.58, 673.84, 220.906, 
gauss: infinitely many solutions found
gauss: xs0: 207.988, 207.988, 613.598, 345.325, 
gauss: ys0: 690.142, 690.142, 451.784, 686.115, 
estimateHomographyRANSAC : support: 571/1557
estimateHomographyRANSAC : best support: 571/1557
estimateHomographyRANSAC : support: 407/930
estimateHomographyRANSAC : support: 417/930
estimateHomographyRANSAC : support: 433/930
estimateHomographyRANSAC : support: 464/930
estimateHomographyRANSAC : support: 474/930
estimateHomographyRANSAC : support: 477/930
estimateHomographyRANSAC : best support: 477/930
bbox: [1263.01, 864], [-183.467, -938.232]
n stable ortho kpts: : 19564
[       OK ] STITCHING.Orthophoto (11376 ms)
[----------] 2 tests from STITCHING (11673 ms total)

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

mozhaa added 5 commits March 18, 2026 08:46
commit de66734
Author: mozhaa <mozhay2005@gmail.com>
Date:   Mon Feb 23 16:20:06 2026 +0300

    feat: better answer in the last question

commit 540e59d
Author: mozhaa <mozhay2005@gmail.com>
Date:   Mon Feb 23 16:15:11 2026 +0300

    feat: implemented all TODOs, enabled tests (they pass)
@simiyutin
Copy link
Contributor

можно и без BA немного улучшить) в частности, есть ли какая-то разница, если склеиваем пять последовательных картинок начиная от первой или от центральной? как это обобщить?

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