vpgl_triangulate_points.h
Go to the documentation of this file.
1 // This is core/vpgl/algo/vpgl_triangulate_points.h
2 #ifndef VPGL_TRIANGULATE_POINTS_H
3 #define VPGL_TRIANGULATE_POINTS_H
4 //:
5 // \file
6 // \brief Determines the 3D location of a point in world space given the 2D location of the point as seen by a collection of cameras.
7 // \author Andrew Hoelscher
8 // \date August 28, 2011
9 
10 #include <vector>
11 #ifdef _MSC_VER
12 # include <vcl_msvc_warnings.h>
13 #endif
14 
15 #include <vgl/vgl_point_2d.h>
16 #include <vgl/vgl_point_3d.h>
17 
19 
20 
22 {
23  public:
24  //: Calculates the best 3D point corresponding to a set of 2D camera points.
25  // Takes in a list of points and cameras, and finds the
26  // least-squared solution to the intersection of the rays
27  // generated by the points. Assumes that point i is viewed
28  // by camera i. The result is placed into point_3d. Returns
29  // the sum of squared errors.
30  static double triangulate(
31  const std::vector<vgl_point_2d<double> > &points,
32  const std::vector<vpgl_perspective_camera<double> > &cameras,
33  vgl_point_3d<double> &point_3d);
34 };
35 
36 #endif // VPGL_TRIANGULATE_POINTS_H
A class for the perspective camera model.
This class implements the perspective camera class as described in Hartley & Zisserman as a finite ca...
static double triangulate(const std::vector< vgl_point_2d< double > > &points, const std::vector< vpgl_perspective_camera< double > > &cameras, vgl_point_3d< double > &point_3d)
Calculates the best 3D point corresponding to a set of 2D camera points.