Re: [Vxl-users] Premise of vnl_levenberg_marquardt hold back Gold standard? From: Marc Anderson - 2004-11-19 01:44 Gehua, Thanks for your reply! As I use the second edition of H&Z book, the algorithm on page 114 is 4.3. As for the number of residuals, I still do not quite understand why it's 4n. Since each point correspondence gives 2 residuals, i.e the squared distances in 2 images are d(x_i, xhat_i)^2 and d(xpri_i, xhatpri_i)^2. it ought to be 2n. below is the code segment of function f in my class derived from vnl_least_squares_function: void XXX:f(const vnl_vector& x, vnl_vector& fx) { ...... for ( int i = 0; i < n; i++ ) { ... fx[2*i] = squared_distance(x1[i], x1_h[i]); fx[2*i+1] = squared_distance(x2[i], x2_h[i]); } } I will be very grateful if you would be patient to give me a further explaination. Marc. --- Gehua Yang wrote: > First of all, Page 114, or Algorithm 3.7 is the Gold > Standard Algorithm for > estimating an AFFINE transformation, not homography. > > If homography is to be estimated, refer to Algorithm > 3.3 on Page 98. There > are two choices: Sampson error or Gold Standard > error. For Sampson error, > there are only 9 parameters(or one can choose other > parameterization). As > for Gold Standard error, there are 2n+9 variables. > But there are 4n > residuals: > sum d(x_i, xhat_i)^2 + d(xpri_i, xhatpri_i)^2 > Recall that LM takes a vector of residuals before > squaring. for each d(.) > function, there are two residuals. Another way to > look at it is that each > ideal point x hat brings in two parameters, but > provides 4 constraints. > > > Gehua > > ----- Original Message ----- > From: Marc Anderson > To: vxl-users@... > Sent: Tuesday, November 16, 2004 9:58 PM > Subject: [Vxl-users] Premise of > vnl_levenberg_marquardt hold back Gold > standard? > > > > Hi, all vxl guys! > > > The class vnl_levenberg_marquardt checks if the > number of parameters is > > less than that of residuals before carrying out > the minimization process, > > otherwise it'll returns false. This requirement > prevents the estimation of > > homography between two images using the Gold > Standard algorithm(H&Z book, > > p114), in which case the number of parameters is > 2n+9 while the number of > > residuals is n. ( where n is the number of point > correspondences ). Would > > someone get the idea to figure this issue out? > Thanks! > > __________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com