Skip to content

Task02 Тернопол Леонид СПбГУ#34

Open
firelion9 wants to merge 4 commits intoPhotogrammetryCourse:task02from
firelion9:task02
Open

Task02 Тернопол Леонид СПбГУ#34
firelion9 wants to merge 4 commits intoPhotogrammetryCourse:task02from
firelion9:task02

Conversation

@firelion9
Copy link

@firelion9 firelion9 commented Mar 15, 2026

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

Эти фильтры тратят меньше ресурсов, чем неудачные попытки RANSAC на отметённых точках

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

Cluster filtering может ломаться, когда на сцене есть похожие объекты (регулярный орнамент на плитке, одинаковые плакаты, ...). Ratio test в этом случае выкинет неоднозначные сопоставления. Но он не справится, например, отличить 2 похожих угла столов, вокруг которых сцены сильно различаются

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

Там, возможно, должен стоять 0, тогда формулы ломаются. Решается перезапуском с предположением, что какой-то другой элемент матрицы равен 1, или решением через SVD

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

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

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

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

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

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

Ссылка на e-maxx.ru в методе Гаусса сломана

Github Actions CI

Run ./build/test_matching
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: 967/967
estimateHomographyRANSAC : best support: 967/967
keypoints RMSE: 0.265907, color RMSE: 6.27118
testing my detector/descriptor...
estimateHomographyRANSAC : support: 570/758
estimateHomographyRANSAC : support: 688/758
estimateHomographyRANSAC : support: 758/758
estimateHomographyRANSAC : best support: 758/758
keypoints RMSE: 0.328267, color RMSE: 12.2216
[       OK ] MATCHING.SimpleStitching (1526 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: 897/914
estimateHomographyRANSAC : support: 914/914
estimateHomographyRANSAC : best support: 914/914
evaluating homography...
nn_score: 0.649656, nn2_score: 0.314621, nn_score_cv: 0.605512, nn2_score_cv: 0.266905, time_my: 0.087494, time_cv: 0.078653, time_bruteforce: 4.58392, good_nn: 0.260015, good_ratio: 0.981607, good_clusters: 0.989648, good_ratio_and_clusters: 0.998906
testing my detector/descriptor...
flann matching...
cv flann matching...
brute force matching
BruteforceMatcher::knnMatch : n query desc : 3697, n train desc : 3351
filtering matches by ratio test...
filtering matches by clusters...
filtering matches by ratio & clusters
estimating homography...
estimateHomographyRANSAC : support: 650/759
estimateHomographyRANSAC : support: 759/759
estimateHomographyRANSAC : best support: 759/759
evaluating homography...
[----------] 18 tests from MATCHING (61011 ms total)

[----------] 2 tests from STITCHING
[ RUN      ] STITCHING.SimplePanorama
estimateHomographyRANSAC : support: 956/959
estimateHomographyRANSAC : support: 957/959
estimateHomographyRANSAC : best support: 957/959
bbox: [1282.17, 640.704], [0, 0]
[       OK ] STITCHING.SimplePanorama (326 ms)
[ RUN      ] STITCHING.Orthophoto
estimateHomographyRANSAC : support: 128/1289
estimateHomographyRANSAC : support: 190/1289
estimateHomographyRANSAC : support: 321/1289
estimateHomographyRANSAC : support: 450/1289
estimateHomographyRANSAC : support: 531/1289
estimateHomographyRANSAC : support: 578/1289
estimateHomographyRANSAC : support: 585/1289
estimateHomographyRANSAC : support: 593/1289
estimateHomographyRANSAC : support: 633/1289
estimateHomographyRANSAC : best support: 633/1289
estimateHomographyRANSAC : support: 9/1039
estimateHomographyRANSAC : support: 61/1039
estimateHomographyRANSAC : support: 285/1039
estimateHomographyRANSAC : support: 392/1039
estimateHomographyRANSAC : support: 437/1039
estimateHomographyRANSAC : support: 458/1039
estimateHomographyRANSAC : support: 534/1039
estimateHomographyRANSAC : support: 569/1039
estimateHomographyRANSAC : best support: 569/1039
estimateHomographyRANSAC : support: 346/1993
estimateHomographyRANSAC : support: 418/1993
estimateHomographyRANSAC : support: 620/1993
estimateHomographyRANSAC : support: 671/1993
estimateHomographyRANSAC : support: 676/1993
estimateHomographyRANSAC : best support: 676/1993
estimateHomographyRANSAC : support: 240/1213
estimateHomographyRANSAC : support: 290/1213
estimateHomographyRANSAC : support: 295/1213
estimateHomographyRANSAC : support: 434/1213
estimateHomographyRANSAC : support: 558/1213
estimateHomographyRANSAC : support: 615/1213
estimateHomographyRANSAC : support: 631/1213
estimateHomographyRANSAC : best support: 631/1213
bbox: [1358.87, 1735.74], [-181.395, -493.404]
estimateHomographyRANSAC : support: 62/1098
estimateHomographyRANSAC : support: 67/1098
estimateHomographyRANSAC : support: 211/1098
estimateHomographyRANSAC : support: 419/1098
estimateHomographyRANSAC : support: 450/1098
estimateHomographyRANSAC : support: 452/1098
estimateHomographyRANSAC : support: 461/1098
estimateHomographyRANSAC : support: 483/1098
estimateHomographyRANSAC : support: 541/1098
estimateHomographyRANSAC : support: 542/1098
estimateHomographyRANSAC : support: 557/1098
estimateHomographyRANSAC : best support: 557/1098
estimateHomographyRANSAC : support: 38/1330
estimateHomographyRANSAC : support: 79/1330
estimateHomographyRANSAC : support: 134/1330
estimateHomographyRANSAC : support: 195/1330
estimateHomographyRANSAC : support: 262/1330
estimateHomographyRANSAC : support: 428/1330
estimateHomographyRANSAC : support: 446/1330
estimateHomographyRANSAC : support: 466/1330
estimateHomographyRANSAC : support: 513/1330
estimateHomographyRANSAC : support: 551/1330
estimateHomographyRANSAC : support: 609/1330
estimateHomographyRANSAC : support: 643/1330
estimateHomographyRANSAC : best support: 643/1330
estimateHomographyRANSAC : support: 446/2035
estimateHomographyRANSAC : support: 511/2035
estimateHomographyRANSAC : support: 625/2035
estimateHomographyRANSAC : support: 627/2035
estimateHomographyRANSAC : support: 631/2035
estimateHomographyRANSAC : support: 633/2035
estimateHomographyRANSAC : support: 654/2035
estimateHomographyRANSAC : support: 712/2035
estimateHomographyRANSAC : support: 727/2035
estimateHomographyRANSAC : best support: 727/2035
estimateHomographyRANSAC : support: 71/1167
estimateHomographyRANSAC : support: 321/1167
estimateHomographyRANSAC : support: 437/1167
estimateHomographyRANSAC : support: 473/1167
estimateHomographyRANSAC : support: 523/1167
estimateHomographyRANSAC : support: 548/1167
estimateHomographyRANSAC : support: 574/1167
estimateHomographyRANSAC : best support: 574/1167
bbox: [1152, 864], [-247.527, -1020.96]
n stable ortho kpts: : 18561
[       OK ] STITCHING.Orthophoto (11977 ms)
[----------] 2 tests from STITCHING (12303 ms total)

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

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.

1 participant