JiawangBian / GMS-Feature-Matcher

GMS: Grid-based Motion Statistics for Fast, Ultra-robust Feature Correspondence (CVPR 17 & IJCV 20)
http://jwbian.net/gms
BSD 3-Clause "New" or "Revised" License
1.09k stars 359 forks source link

How did you get R and t from matches? #9

Closed kmyi closed 7 years ago

kmyi commented 7 years ago

Hello,

I am trying to reproduce your results for the strecha dataset, and was wondering if the benchmark code is available. Since their are hundreds of ways to get the R and the t from the matches, can you please let me know how you retrieved the pose? or the fundamental matrix?

Cheers, Kwang

JiawangBian commented 7 years ago

Hey,

You can use OpenCV function "findEssentialMat" and "recoverPose " to get R and t. The benchmark code is now partially available in my other repository "Image-Matching-Benchmark". I will update it step by step.

Best, JiaWang

kmyi commented 7 years ago

Hello,

Did you use the default options for findEssentialMat in your experiments? As the options do affect the results quite a lot. For example, LMEDS and RANSAC give different results, as well as the RANSAC threshold having a big impact.

Cheers, Kwang

JiawangBian commented 7 years ago

In GMS paper, we use a MATLAB code to compute R and t, which is not released for many reasons. However, if you want to evaluate your algorithm, I suggest that you can use the code in "Image-Matching-Benchmark", where I provide all that you need.

kmyi commented 7 years ago

Hi,

I suggest that you can use the code in "Image-Matching-Benchmark", where I provide all that you need.

Unfortunately, we would like to test on a different dataset than yours, and without knowledge on how the essential matrix is extracted from the matches, we cannot have a fair comparison. Can you please detail the essential matrix computation? For example, if it's the Matlab version, only the norm8point option gives results that are without additional outlier rejection. Which is why we tried using your matches with the 8point algorithm and could not get proper R, t estimated. Do you use any additional outlier rejection on top?

Cheers, Kwang

JiawangBian commented 7 years ago

I just use 5points method. You can use opencv functions with default thresholds. The whole estimation code of GMS is covered in the benchmark repository , and please check the folder “Algorithm”.

kmyi commented 7 years ago

I see... I've checked the code. So you are in fact using RANSAC on top.

Thanks, Kwang

JiawangBian commented 7 years ago

Yes, RANSAC