OpenCV  4.1.0
Open Source Computer Vision
Functions

Functions

double cv::sfm::depth (InputArray R, InputArray t, InputArray X)
 Returns the depth of a point transformed by a rigid transform.
 
void cv::sfm::euclideanToHomogeneous (InputArray src, OutputArray dst)
 Converts points from Euclidean to homogeneous space. E.g., ((x,y)->(x,y,1))
 
void cv::sfm::homogeneousToEuclidean (InputArray src, OutputArray dst)
 Converts point coordinates from homogeneous to euclidean pixel coordinates. E.g., ((x,y,z)->(x/z, y/z))
 
void cv::sfm::KRtFromProjection (InputArray P, OutputArray K, OutputArray R, OutputArray t)
 Get K, R and t from projection matrix P, decompose using the RQ decomposition.
 
void cv::sfm::projectionFromKRt (InputArray K, InputArray R, InputArray t, OutputArray P)
 Get projection matrix P from K, R and t.
 

Detailed Description

Function Documentation

double cv::sfm::depth ( InputArray  R,
InputArray  t,
InputArray  X 
)

Returns the depth of a point transformed by a rigid transform.

Parameters
RInput 3x3 rotation matrix.
tInput 3x1 translation vector.
XInput 3x1 or 4x1 vector with the 3d point.
void cv::sfm::euclideanToHomogeneous ( InputArray  src,
OutputArray  dst 
)

Converts points from Euclidean to homogeneous space. E.g., ((x,y)->(x,y,1))

Parameters
srcInput vector of N-dimensional points.
dstOutput vector of N+1-dimensional points.
void cv::sfm::homogeneousToEuclidean ( InputArray  src,
OutputArray  dst 
)

Converts point coordinates from homogeneous to euclidean pixel coordinates. E.g., ((x,y,z)->(x/z, y/z))

Parameters
srcInput vector of N-dimensional points.
dstOutput vector of N-1-dimensional points.
void cv::sfm::KRtFromProjection ( InputArray  P,
OutputArray  K,
OutputArray  R,
OutputArray  t 
)

Get K, R and t from projection matrix P, decompose using the RQ decomposition.

Parameters
PInput 3x4 projection matrix.
KOutput 3x3 camera matrix \(K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\).
ROutput 3x3 rotation matrix.
tOutput 3x1 translation vector.

Reference:HartleyZ00 A4.1.1 pag.579

void cv::sfm::projectionFromKRt ( InputArray  K,
InputArray  R,
InputArray  t,
OutputArray  P 
)

Get projection matrix P from K, R and t.

Parameters
KInput 3x3 camera matrix \(K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\).
RInput 3x3 rotation matrix.
tInput 3x1 translation vector.
POutput 3x4 projection matrix.

This function estimate the projection matrix by solving the following equation: \(P = K * [R|t]\)