danini / graph-cut-ransac

The Graph-Cut RANSAC algorithm proposed in paper: Daniel Barath and Jiri Matas; Graph-Cut RANSAC, Conference on Computer Vision and Pattern Recognition, 2018. It is available at http://openaccess.thecvf.com/content_cvpr_2018/papers/Barath_Graph-Cut_RANSAC_CVPR_2018_paper.pdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

find bugs and fixed

chaizheng2157 opened this issue · comments

hi, two bugs were found recently when I use this gc-ransac.

  1. In the src/pygcransac/include/solver_fundamental_matrix_seven_point.hfile, if the sum of polynomial coefficients is zero, the program will be stuck when executing psolve.realRoots(real_roots);. So I add a protection like if(c[0]+c[1]+c[2]+c[3] < 1e-9) return false to avoid it.
  2. In the src/pygcransac/include/prosac_sampler.h file, 174 line. If 'subset_size' is bigger than 'point_number', it will be reset to 'point_number', which make '++subset_size' invalid, and then the 'while' will be executed forever. So I add a contidition like while (kth_sample_number > growth_function[subset_size - 1] && subset_size != point_number).

If you have some time, please check the code to verify that if they are bugs. Thanks a lot.

Thanks! Added to the repo.