Thứ Hai, 11 tháng 7, 2016

openMVG libraries

Cameras

This module provides different camera models.
Source Github: https://github.com/openMVG/openMVG/tree/master/src/openMVG/cameras

Pinhole camera model

A camera could be approximated by a projective model, often called pinhole projection. The simplest representation of a camera is a light sensible surface (sensor): an image plane, a lens (projective projection) at a given position and orientation in space.
../../../_images/pinholeCamera.png
The pinhole camera model. An oriented central projective camera.
The pinhole camera geometry models the projective camera with two sub-parametrizations, intrinsic and extrinsic parameters. Intrinsic parameters model the optic component (without distortion) and extrinsic model the camera position and orientation in space. This projection of the camera is described as:


  • Intrinsic parameters 
    • ku,kv: scale factor relating pixels to distance (often equal to 1),
    • f: the focal distance (distance between focal and image plane),
    • the principal point, which would be ideally in the centre of the image.
  • Extrinsic parameters 
    •  the rotation of the camera to the world frame,
    • t: the translation of the camera. t is not the position of the camera. It is the position of the origin of the world coordinate system expressed in coordinates of the camera-centred coordinate system. The position,  of the camera expressed in world coordinates is (since R is a rotation matrix).
A 3D point is projected in a image with the following formula (homogeneous coordinates):




OpenMVG Pinhole camera models

  • Pinhole intrinsic
    • Pinhole_Intrinsic : public IntrinsicBase
      • classic pinhole camera (Focal + principal point and image size).
    • Pinhole_Intrinsic_Radial_K1 : public Pinhole_Intrinsic
      • classic pinhole camera (Focal + principal point and image size) + radial distortion defined by one factor.
      • can add and remove distortion
    • Pinhole_Intrinsic_Radial_K3 : public Pinhole_Intrinsic
      • classic pinhole camera (Focal + principal point and image size) + radial distortion by three factors.
      • can add and remove distortion
    • Pinhole_Intrinsic_Brown_T2 : public Pinhole_Intrinsic
      • classic pinhole camera (Focal + principal point and image size) + radial distortion by three factors + tangential distortion by two factors.
      • can add and remove distortion
    • Pinhole_Intrinsic_Fisheye : public Pinhole_Intrinsic
      • classic pinhole camera (Focal + principal point and image size) + fish-eye distortion by four factors.
      • can add and remove distortion
  • Simple pinhole camera models (intrinsic + extrinsic(pose))
// Setup a simple pinhole camera at origin
// Pinhole camera P = K[R|t], t = -RC
Mat3 K;
K << 1000, 0, 500,
     0, 1000, 500,
     0, 0, 1;
PinholeCamera cam(K, Mat3::Identity(), Vec3::Zero());

Không có nhận xét nào:

Đăng nhận xét