From: Oli C. <Oli.Cooper@Bristol.ac.uk> - 2002-03-19 11:58:50
|
Hi Peter, There were a number of problems, both with Probability.cxx and FMatrixComputeRobust.cxx that I have found and fixed in my own version. I can either send these changes to you or commit them if you wish. I hadn't actually noticed the problem you list below but have changed that as well. The 2 main problems I found were: 1. FMatrixComputeRobust calls FMatrixCompute7Point() which performs conditioning/unconditioning of the points itself, and therefore FMatrixComputeMLESAC and RANSAC should be passed unconditioned points. However the limits in Probability.cxx had been hard-coded to -1.0 to +1.0. Because MonteCarlo() is called by FMatrixComputeRobust before the points are conditioned not enough points are found in the -1 to +1 area. This can be solved by passing FMatrixComputeMLESAC pre-conditioned points, but then these are conditioned again by the 7 point routing and so there may be accumulation of error. I have altered Probablity.cxx and my version now calculates the limits according to the points it is passed and so it works properly with unconditioned points. 2. The constructor in FMatrixComputeRobust() that allows 2 vcl_vectors of HomgPoint2D to be passed is incorrect. The vectors is indexed with the maximum value instead of the loop counter. This means that the created PairMatchSetCorner had only 1 pair of points listed as matches. Let me know what you'd like me to do... Oli. ____________________________________________________________________________ _ Oli Cooper | Phone: +44 117 954 5253 Department of Computer Science | Fax: +44 117 954 5208 University of Bristol | Work Email: oli...@br... Bristol, BS8 1UB | Personal Email: me...@ol... United Kingdom | WWW: www.cs.bris.ac.uk/~cooper/ ---------------------------------------------------------------------------- - > -----Original Message----- > From: Peter Vanroose [mailto:Pet...@es...] > Sent: 18 March 2002 22:35 > To: Oli Cooper > Subject: Re: Monte_Carlo() > > > > I have just started using FMatrixComputeMLESAC(), and I'm > having problems > > with the fact that the Monte_Carlo routine in Probablity.cxx > never seems to > > exit. I seem to remember a few days ago somebody else asked > you about this > > on the mailing list, but I can't find the email. > > There was an error in Probability.cxx, which has been corrected now. > This is the applied diff ("-" is old lines, "+" is new lines): > > -+-+- > @@ -72,10 +72,11 @@ > > // Select from the first list > for(int j = 0; j < index.size(); j++) { > - if(points[j].get_y() >= row_check_lower && > points[j].get_y() < row_check_upper && points[j].get_x() >= > col_check_lower && points[j].get_x() < col_check_upper) { > + double x = points[j].get_x(), y = points[j].get_y(), w = > points[j].get_w(); > + if (w < 0) { x *= -1; y *= -1; w *= -1; } > + if(y >= row_check_lower*w && y < row_check_upper*w && > + x >= col_check_lower*w && x < col_check_upper*w) > list.push_back(index[j]); > - } > } > > int list_size = list.size(); > > -+-+- > Essentially, the old code was looking at affine coordinates, > i.e., ignoring w. > I don't know whether it works now; I haven't heard anything from anybody. > > > > Also, I was trying to run the example code in > > compute_FMatrix_example_own.cxx and it there seems to be a > problem with the > > compute() method of FMatrixComputeMLESAC when it is constructed with > > vcl_vector<HomgPoint2D> rather than a PairMatchSetCorner - Monte_Carlo > > returns an error saying that it is only being passed 1 point. > This doesn't > > happen if you use a PairMatchSetCorner. This is obviously not > so important, > > I just thought you ought to know.... > > No, sorry, I don't know; I never used those FMatrix methods myself... > > > Peter. > |