Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Close
From: Sancar ADALI <muaddib23@ho...>  20040528 01:21:52

<html><div style='backgroundcolor:'><DIV class=RTE>I have been using robust estimation libraries in rrel for a while for finding 2d homography between two sets of points. I added a term for the residuals of inliers in the objective function of rrel_ransac_obj. I was wondering whether there's a particular reason this term wasn't included. If there's no particular reason, I think this term should be added since I've seen a clear improvement in the robust fitting. Here's the objective function where the term I add is the commented line:</DIV> <DIV class=RTE> </DIV> <DIV class=RTE>double<BR>rrel_ransac_obj::fcn( vect_const_iter begin, vect_const_iter end,<BR> double scale,<BR> vnl_vector<double>* /*param_vector*/ ) const<BR>{<BR> double sum = 0;<BR> double thres = scale * scale_mult_;</DIV> <DIV class=RTE> for ( ; begin != end; ++begin ) {<BR> if ( *begin < thres  *begin > thres )<BR> sum += 1.0;<BR> //else sum+= vnl_math_sqr(*begin/vnl_math_abs(thres));<BR> }</DIV> <DIV class=RTE> return sum;<BR>}</DIV> <DIV class=RTE> </DIV> <DIV class=RTE> </DIV> <DIV class=RTE> </DIV> <DIV class=RTE>I've also made some changes in rrel_homography2d_est like rejecting homographies that result from fitting four points that are close by, or those which have matrices with determinant that are lower than some threshold or higher than a threshold. These are all practical strategies for finding a valid homography that aren't in the original random sampling algorithm. I'm not sure whether these changes should be made to rrel_ransam_search class or whether these changes should be incorporated into a derived class though. Please send me feedback about this.</DIV> <DIV class=RTE> </DIV> <DIV class=RTE> </DIV> <DIV class=RTE> </DIV> <DIV class=RTE>Sancar Adali</DIV> <DIV class=RTE>LEMS</DIV> <DIV class=RTE>Brown University</DIV></div><br clear=all><hr>Tired of spam? Get <a href="http://g.msn.com/8HMAEN/2734??PS=47575">advanced junk mail protection</a> with MSN 8.</html> 
From: Amitha Perera <perera@cs...>  20040528 13:57:54

Sancar, Please avoid sending HTML emails to the vxl lists. A number of us use textbased email readers, and it is a lot of effort to read HTMLencoded emails. Sancar ADALI wrote: > I have been using robust estimation libraries in rrel for a while > for finding 2d homography between two sets of points. I added a term > for the residuals of inliers in the objective function of > rrel_ransac_obj. I was wondering whether there's a particular reason > this term wasn't included. The reason is that the RANSAC objective function, by definition, is 0 for inliers and 1 for outliers. And the documentation for that objective function http://paine.wiau.man.ac.uk/pub/doc_vxl/contrib/rpl/rrel/html/classrrel__ransac__obj.html tells you not to use RANSAC anyway. > Here's the objective function where the term I add > is the commented line: > double > rrel_ransac_obj::fcn( vect_const_iter begin, vect_const_iter end, > double scale, > vnl_vector<double>* /*param_vector*/ ) const > { > double sum = 0; > double thres = scale * scale_mult_; > for ( ; begin != end; ++begin ) { > if ( *begin < thres  *begin > thres ) > sum += 1.0; > //else sum+= vnl_math_sqr(*begin/vnl_math_abs(thres)); > } > return sum; > } With that line added, your objective function becomes a truncated linear loss function. Very similar to the truncated quadratic loss function http://paine.wiau.man.ac.uk/pub/doc_vxl/contrib/rpl/rrel/html/classrrel__trunc__quad__obj.html Try using that instead. You'll probably find it performs similar to your truncated linear function. > I've also made some changes in rrel_homography2d_est like rejecting > homographies that result from fitting four points that are close by, > or those which have matrices with determinant that are lower than > some threshold or higher than a threshold. These are all practical > strategies for finding a valid homography that aren't in the > original random sampling algorithm. > I'm not sure whether these changes should be made to > rrel_ransam_search class or whether these changes should be > incorporated into a derived class though. Please send me feedback > about this. I don't have too much experience in the theory of homography estimation. Is there a way to automatically set these thresholds to be valid for any homography estimation problem? Given enough samples, these estimates should be rejected anyway simply because their cost is higher than a better one. Is the problem that not enough samples are being used? Or that the samples are not random (biased in some way, perhaps)? Is this an artifact of using RANSAC instead of a smoother loss function? I think practical improvements to theoretical algorithms is a good thing. However, I also think that we need to understand a little of why the theory is breaking down first. Perhaps others with more experience in this will also comment. Amitha. 