contrib/oxl/mvl/mvl_linear_backproject.h
Go to the documentation of this file.
00001 #ifndef mvl_linear_backproject_h_
00002 #define mvl_linear_backproject_h_
00003 
00004 // not used? #include <vcl_iostream.h>
00005 // not used? #include <vcl_cmath.h>
00006 #include <vcl_vector.h>
00007 
00008 #include <mvl/PMatrix.h>
00009 #include <mvl/HomgPoint2D.h>
00010 #include <mvl/HomgPoint3D.h>
00011 
00012 #include <vnl/vnl_vector.h>
00013 
00014 // Author: Oli Cooper.
00015 // For details see Hartley & Sturm 'Triangulation'
00016 // To use iterative method call initially with re_weighted = false, then repeat
00017 // passing previous value of X and re_weighted = true
00018 // repeat until convergence achieved (compare weights vector returned against previous)
00019 // Least-Squares method is affine invariant whereas eigenvector method is not
00020 
00021 vnl_vector<double> mvl_linear_backproject(
00022           // camera matrices:
00023           vcl_vector<PMatrix> Ps,
00024           // image coordinates:
00025           HomgPoint2D const *imgcoords,
00026           // world point:
00027           HomgPoint3D &X,
00028           // if true use current value of X to commute weights.
00029           bool re_weighted = false,
00030           // if 'e' then use eigenvalue method if 'l' use least-squares
00031           char method = 'e');
00032 
00033 #endif // mvl_linear_backproject_h_