find bugs and fixed
chaizheng2157 opened this issue · comments
chaizheng2157 commented
hi, two bugs were found recently when I use this gc-ransac.
- In the
src/pygcransac/include/solver_fundamental_matrix_seven_point.h
file, if the sum of polynomial coefficients is zero, the program will be stuck when executingpsolve.realRoots(real_roots);
. So I add a protection likeif(c[0]+c[1]+c[2]+c[3] < 1e-9) return false
to avoid it. - 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 likewhile (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.
Daniel Barath commented
Thanks! Added to the repo.