Into

Modules

Documentation

classPiiStereoTriangulator

#include <PiiStereoTriangulator.h>

A class that calculates 3D world coordinates for objects seen from 2 to N viewpoints.

Description

See Stereo Imaging for an overview. PiiStereoTriangulator is able to compute accurate 3D measurements by combining information from many cameras. It enhances the accuracy of stereo triangulation by averaging triangulation results from all possible stereo pairs if more than two cameras are available.

Constructors and destructor

Create a new stereo trangulator.

Public member functions

void

Add a new camera to the triangulator.

PiiMatrix< double >
( )

Given a list of points in 2-dimensional image coordinates calculate the corresponding 3-dimensional coordinates.

Function details

  • PiiStereoTriangulator

    ()

    Create a new stereo trangulator.

  • ~PiiStereoTriangulator

    ()
  • void addCamera

    ( )

    Add a new camera to the triangulator.

    The triangulator will automatically calculate the relative positions of the cameras. To be able to measure 3D positions, at least two cameras must be added.

    Parameters
    intrinsic

    the intrinsic parameters of a camera

    extrinsic

    the relative position of the camera wrt to the world coordinate system

  • PiiMatrix< double > calculate3DPoints

    ( )

    Given a list of points in 2-dimensional image coordinates calculate the corresponding 3-dimensional coordinates.

    To convert the result to world coordinates, use the PiiCalibration::cameraToWorldCoordinates() function with the extrinsic parameters of the first camera.

    Parameters
    imagePoints

    the coordinates of the objects to measure, in pixels (N-by-2). All matrices must be of the same size, and there must be one set of coordinates for each camera added to the triangulator. The coordinates from the cameras must be given in the same order the cameras were added. If a measurement point is not available in one of the views, the point's coordinates must be set to NaN.

    Returns

    3-dimensional coordinates of the points in the reference frame of the camera first added with addCamera() (a N-by-3 matrix). If a point is not visible in a sufficient number of views or if the estimation error is deemed too large, all of its coordinates will be set to NaN.

    Exceptions
    PiiCalibrationException&

    if the data is not correctly formatted.

Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.