Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## Re: [Vxl-users] Premise of vnl_levenberg_marquardt hold back Gold standard?

 Re: [Vxl-users] Premise of vnl_levenberg_marquardt hold back Gold standard? From: Marc Anderson - 2004-11-19 01:44:01 ```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 ```

 [Vxl-users] Premise of vnl_levenberg_marquardt hold back Gold standard? From: Marc Anderson - 2004-11-17 02:58:42 Attachments: Message as HTML ```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! Leonard __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ```
 Re: [Vxl-users] Premise of vnl_levenberg_marquardt hold back Gold standard? From: Gehua Yang - 2004-11-18 18:02:02 ```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! ```
 Re: [Vxl-users] Premise of vnl_levenberg_marquardt hold back Gold standard? From: Marc Anderson - 2004-11-19 01:44:01 ```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 ```
 Re: [Vxl-users] Premise of vnl_levenberg_marquardt hold back Gold standard? From: Gehua Yang - 2004-11-19 18:27:24 ```Recall that LM takes a vector of residuals BEFORE squaring. In this case, the function shall look like: fx[4*i] = x1[i][0]-x1_h[i][0]; fx[4*i+1] = x1[i][1]-x1_h[i][1]; fx[4*i+2] = x2[i][0]-x2_h[i][0]; fx[4*i+3] = x2[i][1]-x2_h[i][1]; > 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. > ```
 [Vxl-users] re:Premise of vnl_levenberg_marquardt hold back Gold standard? From: Xiaowei Li - 2004-11-19 07:22:25 ```Hi, Marc I think your code would be modified as the follow which yields 4n residuals: void XXX:f(const vnl_vector& x, vnl_vector& fx) { ...... for ( int i = 0; i < n; i++ ) { ... fx[4*i] = (x1[i].first, x1_h[i].first)^2; fx[4*i+1] = (x1[i].second, x1_h[i].second)^2; fx[4*i+2] = (x2[i].first, x2_h[i].first)^2; fx[4*i+3] = (x2[i].second, x2_h[i].second)^2; } } in which,x1[i].first refers to the "x" element of a 2D point,and x1[i].second the "y" element. Shawrie Lee regards. ```