Ocean
Ocean::Geometry::AutoCalibration Class Reference

This class implements self-calibration for multiple views. More...

Static Public Member Functions

static bool findCommonIntrinsicsFromProjectionMatricesIF (const ConstIndexedAccessor< HomogenousMatrix4 > &iFlippedProjectionMatrices, SquareMatrix3 &cameraIntrinsics, SquareMatrix4 *Q=nullptr, SquareMatrix3 *omega=nullptr)
 Estimate the common intrinsic camera matrix based on an Absolute Conic omega (ω):
omega = K * K^T — (ω_j = ω = KK^T). More...
 
static bool findCommonIntrinsicsFromProjectionMatricesIF (const ConstIndexedAccessor< HomogenousMatrix4 > &iFlippedProjectionMatrices, const unsigned int imageWidth, const unsigned int imageHeight, SquareMatrix3 &cameraIntrinsics, SquareMatrix4 *Q=nullptr, SquareMatrix3 *omega=nullptr)
 Estimate a common intrinsic camera matrix based on an Absolute Conic ω:
ω_j = ω = KK^T. More...
 
static bool determineAbsoluteDualQuadricLinearIF (const ConstIndexedAccessor< HomogenousMatrix4 > &iFlippedProjectionMatrices, SquareMatrix4 &matrixQ, const unsigned int imageWidth, const unsigned int imageHeight, bool equalFxFy=true)
 Estimates the absolute dual quadric Q_infinity (Q∞) from several projection-pose matrices by solving a linear system:
omega = P_j * Q_infinity * P_j^T — (ω_j = P_j * Q∞ * P_j^T). More...
 
static bool intrinsicsFromAbsoluteDualQuadricIF (const SquareMatrix4 &symmetricQ, const ConstIndexedAccessor< HomogenousMatrix4 > &iFlippedProjectionMatrices, SquareMatrix3 *intrinsics)
 Determines individual intrinsic camera matrices from a known absolute dual quadric Q_infinity (Q∞) and corresponding camera-projection-pose matrices:
omega_j = P_j * Q_infinity * P_J^T = K_j * K_j^T — (ω_j = P_j * Q∞ * P_J^T = K_j * K_j^T). More...
 
static bool transformProjectiveToMetricIF (const SquareMatrix4 &Q, const ConstIndexedAccessor< HomogenousMatrix4 > &iFlippedProjectionMatrices, HomogenousMatrix4 *iFlippedMetricProjectionMatrices, SquareMatrix4 *transformation=nullptr)
 Transforms a projective reconstruction towards a metric reconstruction. More...
 
static bool metricProjectionMatricesToPosesIF (const ConstIndexedAccessor< HomogenousMatrix4 > &metricProjectionsIF, const SquareMatrix3 &intrinsic, HomogenousMatrix4 *posesIF)
 Decomposes metric camera projection matrices all containing/sharing the same known camera matrix (intrinsic camera matrix) into (inverted and flipped) camera poses simply by applying the inverted intrinsic matrix. More...
 

Static Protected Member Functions

static bool transformProjectionsZeroPrinciplePoint (const ConstIndexedAccessor< HomogenousMatrix4 > &iFlippedProjectionMatrices, const unsigned int imageWidth, const unsigned int imageHeight, HomogenousMatrix4 *iFlippedNormalizedProjectionMatrices, SquareMatrix3 *backTransformation=nullptr)
 Transforms an inverted and flipped camera projection matrix P = K * [R|t] in a way that the principle point of the camera profile (the camera intrinsics) is zero. More...
 
static bool getTransformProjectiveToMetricMatrix (const SquareMatrix4 &Q, SquareMatrix4 &transformation)
 Determines the perspective transformation to get a metric reconstruction. More...
 

Static Private Member Functions

static bool upperTriangleCholeskyDecomposition (const SquareMatrix3 &omega, SquareMatrix3 &cameraIntrinsic)
 Performs the decomposition of an absolute conic omega (ω) into the intrinsic camera matrix:
omega = K * K^T — (ω = K * K^T), where K is the camera matrix (which is a upper triangular matrix). More...
 
static Matrix createLinearSystemForAbsoluteDualQuadric (const unsigned int omegaRowIndex, const unsigned int omegaColumnIndex, const HomogenousMatrix4 &iFlippedProjectionMatrix)
 Creates a line for the linear system for the zero condition of absolute conic ω(i, j). More...
 

Detailed Description

This class implements self-calibration for multiple views.

Member Function Documentation

◆ createLinearSystemForAbsoluteDualQuadric()

static Matrix Ocean::Geometry::AutoCalibration::createLinearSystemForAbsoluteDualQuadric ( const unsigned int  omegaRowIndex,
const unsigned int  omegaColumnIndex,
const HomogenousMatrix4 iFlippedProjectionMatrix 
)
staticprivate

Creates a line for the linear system for the zero condition of absolute conic ω(i, j).


The line contains values of the upper triangle entities of absolute dual quadric matrix Q_infinity — (Q∞): ω(i, j) = [P * Q∞ * P^T](i, j) = 0

Parameters
omegaRowIndexRow index of absolute conic ω
omegaColumnIndexColumn index of absolute conic ω
iFlippedProjectionMatrixThe inverted and flipped camera projection matrix, must be valid
Returns
A line matrix [1x10] containing the values of the upper triangle entities of the symmetric matrix Q∞

◆ determineAbsoluteDualQuadricLinearIF()

static bool Ocean::Geometry::AutoCalibration::determineAbsoluteDualQuadricLinearIF ( const ConstIndexedAccessor< HomogenousMatrix4 > &  iFlippedProjectionMatrices,
SquareMatrix4 matrixQ,
const unsigned int  imageWidth,
const unsigned int  imageHeight,
bool  equalFxFy = true 
)
static

Estimates the absolute dual quadric Q_infinity (Q∞) from several projection-pose matrices by solving a linear system:
omega = P_j * Q_infinity * P_j^T — (ω_j = P_j * Q∞ * P_j^T).


Here, we assume no skew and the principle point in the center of the camera frame.

Parameters
iFlippedProjectionMatricesThe inverted and flipped camera projection matrices [K | P0], [K | P1], [K | P2], ..., with Pi = [Ri | ti], at least 3
matrixQResulting absolute dual quadric Q_infinity — (Q∞)
imageWidthWidth of the camera frame in pixel, with range [1, infinity)
imageHeightHeight of the camera frame in pixel, with range [1, infinity)
equalFxFyForces equal focal length in both dimension
Returns
True, if succeeded
See also
findCommonIntrinsicsFromProjectionMatricesIF()

◆ findCommonIntrinsicsFromProjectionMatricesIF() [1/2]

static bool Ocean::Geometry::AutoCalibration::findCommonIntrinsicsFromProjectionMatricesIF ( const ConstIndexedAccessor< HomogenousMatrix4 > &  iFlippedProjectionMatrices,
const unsigned int  imageWidth,
const unsigned int  imageHeight,
SquareMatrix3 cameraIntrinsics,
SquareMatrix4 Q = nullptr,
SquareMatrix3 omega = nullptr 
)
static

Estimate a common intrinsic camera matrix based on an Absolute Conic ω:
ω_j = ω = KK^T.


Solve a linear system by assuming zero skew, a known principle point (centered in the camera frame) and equal focal length for each ω

Parameters
iFlippedProjectionMatricesInverted and flipped camera projection matrices [K | P0], [K | P1], [K | P2], ..., with Pi = [Ri | ti], at least 3
imageWidthWidth of the camera frame in pixel, with range [1, infinity)
imageHeightHeight of the camera frame in pixel, with range [1, infinity)
cameraIntrinsicsResulting camera intrinsics matrix
QResulting absolute dual quadric Q∞, optionally
omegaResulting absolute conic &omega, optionally
Returns
True, if succeeded
See also
findAbsoluteDualQuadricLinear()

◆ findCommonIntrinsicsFromProjectionMatricesIF() [2/2]

static bool Ocean::Geometry::AutoCalibration::findCommonIntrinsicsFromProjectionMatricesIF ( const ConstIndexedAccessor< HomogenousMatrix4 > &  iFlippedProjectionMatrices,
SquareMatrix3 cameraIntrinsics,
SquareMatrix4 Q = nullptr,
SquareMatrix3 omega = nullptr 
)
static

Estimate the common intrinsic camera matrix based on an Absolute Conic omega (ω):
omega = K * K^T — (ω_j = ω = KK^T).


Solve a linear system by assuming equal entities in each ω

Parameters
iFlippedProjectionMatricesThe inverted and flipped camera projection matrices [K * P0], [K * P1], [K * P2], ..., with Pi = [Ri | ti], at least 3
cameraIntrinsicsResulting intrinsic camera matrix
QOptional resulting absolute dual quadric Q∞
omegaOptional resulting absolute conic &omega
Returns
True, if succeeded
See also
findAbsoluteDualQuadricLinear()

◆ getTransformProjectiveToMetricMatrix()

static bool Ocean::Geometry::AutoCalibration::getTransformProjectiveToMetricMatrix ( const SquareMatrix4 Q,
SquareMatrix4 transformation 
)
staticprotected

Determines the perspective transformation to get a metric reconstruction.


Q∞ = H * Î * H^T, factorized by eigen decomposition.

Parameters
QAbsolute dual quadric Q∞
transformationResulting perspective transformation H
Returns
True, if succeeded
See also
transformProjectiveToMetric()

◆ intrinsicsFromAbsoluteDualQuadricIF()

static bool Ocean::Geometry::AutoCalibration::intrinsicsFromAbsoluteDualQuadricIF ( const SquareMatrix4 symmetricQ,
const ConstIndexedAccessor< HomogenousMatrix4 > &  iFlippedProjectionMatrices,
SquareMatrix3 intrinsics 
)
static

Determines individual intrinsic camera matrices from a known absolute dual quadric Q_infinity (Q∞) and corresponding camera-projection-pose matrices:
omega_j = P_j * Q_infinity * P_J^T = K_j * K_j^T — (ω_j = P_j * Q∞ * P_J^T = K_j * K_j^T).


The Cholesky decomposition is applied to factorize omega into K.

Parameters
symmetricQThe absolute dual quadric q_infinity which is symmetric
iFlippedProjectionMatricesThe inverted and flipped camera projection pose matrices
intrinsicsThe resulting intrinsic camera matrices, one for each projection pose matrix
Returns
True, if succeeded
See also
findAbsoluteDualQuadricLinear()
transformProjectionsZeroPrinciplePoint()

◆ metricProjectionMatricesToPosesIF()

static bool Ocean::Geometry::AutoCalibration::metricProjectionMatricesToPosesIF ( const ConstIndexedAccessor< HomogenousMatrix4 > &  metricProjectionsIF,
const SquareMatrix3 intrinsic,
HomogenousMatrix4 posesIF 
)
static

Decomposes metric camera projection matrices all containing/sharing the same known camera matrix (intrinsic camera matrix) into (inverted and flipped) camera poses simply by applying the inverted intrinsic matrix.

Based on the following equation: P_metric = K * [R t] we can determine the camera poses by: [R t] = K^-1 * p_metric.

Parameters
metricProjectionsIFThe inverted and flipped metric camera projection matrices
intrinsicThe already known intrinsic camera matrix K
posesIFThe resulting inverted and flipped camera poses, one for each given camera projection matrix
Returns
True, if succeeded
See also
transformProjectiveToMetric().

◆ transformProjectionsZeroPrinciplePoint()

static bool Ocean::Geometry::AutoCalibration::transformProjectionsZeroPrinciplePoint ( const ConstIndexedAccessor< HomogenousMatrix4 > &  iFlippedProjectionMatrices,
const unsigned int  imageWidth,
const unsigned int  imageHeight,
HomogenousMatrix4 iFlippedNormalizedProjectionMatrices,
SquareMatrix3 backTransformation = nullptr 
)
staticprotected

Transforms an inverted and flipped camera projection matrix P = K * [R|t] in a way that the principle point of the camera profile (the camera intrinsics) is zero.


P' = T * P.

Parameters
iFlippedProjectionMatricesInverted and flipped camera projection matrices, at least one
imageWidthWidth of image in pixel, with range [1, infinity)
imageHeightHeight of image in pixel, with range [1, infinity)
iFlippedNormalizedProjectionMatricesResulting normalized inverted and flipped camera projection matrices, one for each given camera projection matrix
backTransformationOptional resulting back transformation matrix T^-1
Returns
True, if succeeded
See also
transformProjectiveToMetric()

◆ transformProjectiveToMetricIF()

static bool Ocean::Geometry::AutoCalibration::transformProjectiveToMetricIF ( const SquareMatrix4 Q,
const ConstIndexedAccessor< HomogenousMatrix4 > &  iFlippedProjectionMatrices,
HomogenousMatrix4 iFlippedMetricProjectionMatrices,
SquareMatrix4 transformation = nullptr 
)
static

Transforms a projective reconstruction towards a metric reconstruction.


Q∞ = H * Î * H^T.
P_metric = P * H.

Parameters
QAbsolute dual quadric Q∞
iFlippedProjectionMatricesThe camera projection matrices (inverted flipped)
iFlippedMetricProjectionMatricesResulting metric projection matrices (inverted flipped)
transformationOptional resulting perspective transformation matrix
Returns
True, if succeeded
See also
getTransformProjectiveToMetricMatrix()

◆ upperTriangleCholeskyDecomposition()

static bool Ocean::Geometry::AutoCalibration::upperTriangleCholeskyDecomposition ( const SquareMatrix3 omega,
SquareMatrix3 cameraIntrinsic 
)
staticprivate

Performs the decomposition of an absolute conic omega (ω) into the intrinsic camera matrix:
omega = K * K^T — (ω = K * K^T), where K is the camera matrix (which is a upper triangular matrix).


The Cholesky decomposition is applied.

Parameters
omegaThe (symmetric) absolute conic to be decomposed (ω)
cameraIntrinsicThe resulting intrinsic camera matrix
Returns
True, if succeeded

The documentation for this class was generated from the following file: