vpgl_invmap_cost_function.h
Go to the documentation of this file.
1 // This is core/vpgl/algo/vpgl_invmap_cost_function.h
2 #ifndef vpgl_invmap_cost_function_h_
3 #define vpgl_invmap_cost_function_h_
4 //:
5 // \file
7 #include <vnl/vnl_vector_fixed.h>
8 #include <vpgl/vpgl_camera.h>
9 
11 {
12  //: Which parameterization to use for the plane
13  enum plane_param{X_Y=0, X_Z, Y_Z};
14  public:
15  //: Constructor - rcam pointer is not deleted by this class
17  vnl_vector_fixed<double, 4> const& plane,
18  const vpgl_camera<double>* rcam);
19  ~vpgl_invmap_cost_function() override = default;
20  //: The cost function. x is a vector holding the two plane parameters
21  double f(vnl_vector<double> const& x) override;
22  //: set the parameter values from the 3-d point
24  //: set the parameter values from the 3-d point
25  // (Deprecated interface)
27  //: get the 3-d point defined by the parameters (and the plane).
29  //: get the 3-d point defined by the parameters (and the plane).
30  // (Deprecated interface)
32 
33  protected:
34  //: image point
36  //: plane coefficients
38  //: rational camera
40  //: the well-conditioned parameterization
42 };
43 
44 #endif // vpgl_invmap_cost_function_h_
void set_params(vnl_vector_fixed< double, 3 > const &xyz, vnl_vector_fixed< double, 2 > &x)
set the parameter values from the 3-d point.
~vpgl_invmap_cost_function() override=default
void point_3d(vnl_vector_fixed< double, 2 > const &x, vnl_vector_fixed< double, 3 > &xyz)
get the 3-d point defined by the parameters (and the plane).
vnl_vector_fixed< double, 4 > plane_
plane coefficients.
const vpgl_camera< double > * cam_ptr_
rational camera.
A general camera class.
double f(vnl_vector< double > const &x) override
The cost function. x is a vector holding the two plane parameters.
vpgl_invmap_cost_function(vnl_vector_fixed< double, 2 > const &image_point, vnl_vector_fixed< double, 4 > const &plane, const vpgl_camera< double > *rcam)
Constructor - rcam pointer is not deleted by this class.
plane_param pp_
the well-conditioned parameterization.
plane_param
Which parameterization to use for the plane.
vnl_vector_fixed< double, 2 > image_point_
image point.