Various methods for computing a perspective camera. More...
#include <vpgl_camera_compute.h>
Static Public Member Functions | |
static bool | compute (const vcl_vector< vgl_point_2d< double > > &image_pts, const vcl_vector< vgl_point_3d< double > > &world_pts, const vpgl_calibration_matrix< double > &K, vpgl_perspective_camera< double > &camera) |
Compute from two sets of corresponding points. | |
static bool | compute_dlt (const vcl_vector< vgl_point_2d< double > > &image_pts, const vcl_vector< vgl_point_3d< double > > &world_pts, vpgl_perspective_camera< double > &camera, double &err) |
Uses the direct linear transform algorithm described in "Multiple. | |
static bool | compute (const vcl_vector< vgl_point_2d< double > > &image_pts, const vcl_vector< vgl_point_2d< double > > &ground_pts, vpgl_perspective_camera< double > &camera) |
Compute from two sets of corresponding 2D points (image and ground plane). | |
Private Member Functions | |
vpgl_perspective_camera_compute () |
Various methods for computing a perspective camera.
Definition at line 57 of file vpgl_camera_compute.h.
vpgl_perspective_camera_compute::vpgl_perspective_camera_compute | ( | ) | [private] |
bool vpgl_perspective_camera_compute::compute | ( | const vcl_vector< vgl_point_2d< double > > & | image_pts, |
const vcl_vector< vgl_point_3d< double > > & | world_pts, | ||
const vpgl_calibration_matrix< double > & | K, | ||
vpgl_perspective_camera< double > & | camera | ||
) | [static] |
Compute from two sets of corresponding points.
Put the resulting camera into camera
Definition at line 135 of file vpgl_camera_compute.cxx.
bool vpgl_perspective_camera_compute::compute | ( | const vcl_vector< vgl_point_2d< double > > & | image_pts, |
const vcl_vector< vgl_point_2d< double > > & | ground_pts, | ||
vpgl_perspective_camera< double > & | camera | ||
) | [static] |
Compute from two sets of corresponding 2D points (image and ground plane).
ground_pts | are 2D points representing world points with Z=0 The calibration matrix of camera is enforced This computation is simpler than the general case above and only requires 4 points Put the resulting camera into camera |
ground_pts | are 2D points representing world points with Z=0 The calibration matrix of camera is enforced This computation is simpler than the general case above and only requires 4 points Put the resulting camera into camera , return true if successful. |
Definition at line 417 of file vpgl_camera_compute.cxx.
bool vpgl_perspective_camera_compute::compute_dlt | ( | const vcl_vector< vgl_point_2d< double > > & | image_pts, |
const vcl_vector< vgl_point_3d< double > > & | world_pts, | ||
vpgl_perspective_camera< double > & | camera, | ||
double & | err | ||
) | [static] |
Uses the direct linear transform algorithm described in "Multiple.
View Geometry in Computer Vision" to find the projection matrix, and extracts the parameters of the camera from this projection matrix. Requires: image_pts
and world_pts
are correspondences. image_pts
is the projected form, and world_pts
is the unprojected form. There need to be at least 6 points.
err
is filled with the two-norm of the projection error vector. camera
is filled with the perspective decomposition of the projection matrix.View Geometry in Computer Vision" to find the projection matrix, and extracts the parameters of the camera from this projection matrix. Requires: image_pts and world_pts are correspondences. image_pts is the projected form, and world_pts is the unprojected form. There need to be at least 6 points. Returns: true if successful. err is filled with the two-norm of the projection error vector. camera is filled with the perspective decomposition of the projection matrix
Definition at line 294 of file vpgl_camera_compute.cxx.