Name
reconstruct_points_stereoT_reconstruct_points_stereoReconstructPointsStereoreconstruct_points_stereoReconstructPointsStereoReconstructPointsStereo — Reconstruct 3D points from calibrated multi-view stereo images.
Herror T_reconstruct_points_stereo(const Htuple StereoModelID, const Htuple Row, const Htuple Column, const Htuple CovIP, const Htuple CameraIdx, const Htuple PointIdx, Htuple* X, Htuple* Y, Htuple* Z, Htuple* CovWP, Htuple* PointIdxOut)
Herror reconstruct_points_stereo(const HTuple& StereoModelID, const HTuple& Row, const HTuple& Column, const HTuple& CovIP, const HTuple& CameraIdx, const HTuple& PointIdx, double* X, double* Y, double* Z, double* CovWP, Hlong* PointIdxOut)
Herror reconstruct_points_stereo(const HTuple& StereoModelID, const HTuple& Row, const HTuple& Column, const HTuple& CovIP, const HTuple& CameraIdx, const HTuple& PointIdx, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovWP, HTuple* PointIdxOut)
HTuple HStereoModel::ReconstructPointsStereo(const HTuple& Row, const HTuple& Column, const HTuple& CovIP, const HTuple& CameraIdx, const HTuple& PointIdx, HTuple* Y, HTuple* Z, HTuple* CovWP, HTuple* PointIdxOut) const
void ReconstructPointsStereo(const HTuple& StereoModelID, const HTuple& Row, const HTuple& Column, const HTuple& CovIP, const HTuple& CameraIdx, const HTuple& PointIdx, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovWP, HTuple* PointIdxOut)
void HStereoModel::ReconstructPointsStereo(const HTuple& Row, const HTuple& Column, const HTuple& CovIP, Hlong CameraIdx, Hlong PointIdx, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovWP, HTuple* PointIdxOut) const
void HStereoModel::ReconstructPointsStereo(double Row, double Column, const HTuple& CovIP, Hlong CameraIdx, Hlong PointIdx, double* X, double* Y, double* Z, double* CovWP, Hlong* PointIdxOut) const
void HOperatorSetX.ReconstructPointsStereo(
[in] VARIANT StereoModelID, [in] VARIANT Row, [in] VARIANT Column, [in] VARIANT CovIP, [in] VARIANT CameraIdx, [in] VARIANT PointIdx, [out] VARIANT* X, [out] VARIANT* Y, [out] VARIANT* Z, [out] VARIANT* CovWP, [out] VARIANT* PointIdxOut)
VARIANT HStereoModelX.ReconstructPointsStereo(
[in] VARIANT Row, [in] VARIANT Column, [in] VARIANT CovIP, [in] Hlong CameraIdx, [in] Hlong PointIdx, [out] VARIANT* Y, [out] VARIANT* Z, [out] VARIANT* CovWP, [out] VARIANT* PointIdxOut)
static void HOperatorSet.ReconstructPointsStereo(HTuple stereoModelID, HTuple row, HTuple column, HTuple covIP, HTuple cameraIdx, HTuple pointIdx, out HTuple x, out HTuple y, out HTuple z, out HTuple covWP, out HTuple pointIdxOut)
void HStereoModel.ReconstructPointsStereo(HTuple row, HTuple column, HTuple covIP, int cameraIdx, int pointIdx, out HTuple x, out HTuple y, out HTuple z, out HTuple covWP, out HTuple pointIdxOut)
void HStereoModel.ReconstructPointsStereo(double row, double column, HTuple covIP, int cameraIdx, int pointIdx, out double x, out double y, out double z, out double covWP, out int pointIdxOut)
The operator reconstruct_points_stereoreconstruct_points_stereoReconstructPointsStereoreconstruct_points_stereoReconstructPointsStereoReconstructPointsStereo reconstructs 3D points
from point correspondences found in the images of a calibrated
multi-view stereo setup. The calibration information for the images
is provided in the camera setup model that is associated with the
stereo model StereoModelIDStereoModelIDStereoModelIDStereoModelIDStereoModelIDstereoModelID during
its creation (see create_stereo_modelcreate_stereo_modelCreateStereoModelcreate_stereo_modelCreateStereoModelCreateStereoModel). Note that the stereo
model type must be 'points_3d'"points_3d""points_3d""points_3d""points_3d""points_3d", otherwise the operator will
return an error.
The point correspondences must be passed in the parameters RowRowRowRowRowrow,
ColumnColumnColumnColumnColumncolumn, CameraIdxCameraIdxCameraIdxCameraIdxCameraIdxcameraIdx, and PointIdxPointIdxPointIdxPointIdxPointIdxpointIdx in form of
tuples of the same length. Each set
(Row[I],Column[I],CameraIdx[I],PointIdx[I]) represents the
image coordinates (RowRowRowRowRowrow, ColumnColumnColumnColumnColumncolumn) of the 3D point
(PointIdxPointIdxPointIdxPointIdxPointIdxpointIdx) in the image of a certain camera
(CameraIdxCameraIdxCameraIdxCameraIdxCameraIdxcameraIdx).
The reconstructed 3D point coordinates are returned in the
tuples XXXXXx, YYYYYy, and ZZZZZz, relative to the
coordinate system of the camera setup model (see
create_camera_setup_modelcreate_camera_setup_modelCreateCameraSetupModelcreate_camera_setup_modelCreateCameraSetupModelCreateCameraSetupModel). The tuple PointIdxOutPointIdxOutPointIdxOutPointIdxOutPointIdxOutpointIdxOut
contains the corresponding point indices.
The reconstruction algorithm works as follows: First, it identifies
point correspondences for a given 3D point by collecting all
sets with the same PointIdxPointIdxPointIdxPointIdxPointIdxpointIdx. Then, it uses the
RowRowRowRowRowrow, ColumnColumnColumnColumnColumncolumn, and CameraIdxCameraIdxCameraIdxCameraIdxCameraIdxcameraIdx information
from the collected sets to project lines of sight from each
camera through the corresponding image point
[Row,Column]. If there are at least 2 lines of sight for the
point PointIdxPointIdxPointIdxPointIdxPointIdxpointIdx, they are intersected and the result is
stored as the set (X[J],Y[J],Z[J],PointIdxOut[J]). The
intersection is performed with a least-squares algorithm, without
taking into account potentially invalid lines of sight (e.g., if an
image point was falsely specified as corresponding to a certain 3D point).
To compute the covariance matrices for the reconstructed 3D points,
statistical information about the extracted image coordinates, i.e.,
the covariance matrices of the image points
(see , e.g., points_foerstnerpoints_foerstnerPointsFoerstnerpoints_foerstnerPointsFoerstnerPointsFoerstner) are needed as input and must be
passed in the parameter CovIPCovIPCovIPCovIPCovIPcovIP. Otherwise, if no covariance
matrices for the 3D points are needed or no covariance matrices for
the image points are available, an empty tuple can be passed
in CovIPCovIPCovIPCovIPCovIPcovIP. Then no covariance matrix for the reconstructed
3D points is computed.
The covariance matrix of an image point is:
/ (sigma_r)^2 sigma_rc \
CovIP = | |.
\ sigma_rc (sigma_c)^2 /
The covariance matrices are symmetric 2x2 matrices, whose entries in the
main diagonal represent the variances of the image point in row-direction
and column-direction, respectively.
For each image point, a covariance matrix must be passed in CovIPCovIPCovIPCovIPCovIPcovIP in
form of a tuple with 4 elements:
[(sigma_r)^2, sigma_rc, sigma_rc, (sigma_c)^2].
Thus, |CovIP|=4*|Row| and CovIP[I*4:I*4+3] is the
covariance matrix for the I-th image point.
The computed covariance matrix for a successfully reconstructed 3D
point is represented by a symmetric 3x3 matrix:
/ (sigma_x)^2 sigma_xy sigma_xz \
CovWP = | sigma_yx (sigma_y)^2 sigma_yz |.
\ sigma_zx sigma_zy (sigma_z)^2 /
The diagonal entries represent the variances of the reconstructed
3D point in x-, y-, and z-direction. The computed matrices are
returned in the parameter CovWPCovWPCovWPCovWPCovWPcovWP in form of
tuples each with 9 elements:
[(sigma_x)^2, sigma_xy, sigma_xz, sigma_yx, (sigma_y)^2, sigma_yz, sigma_zx, sigma_zy, (sigma_z)^2].
Thus, |CovWP|=9*|X| and CovWP[J*9:J*9+8] is the covariance matrix
for the J-th 3D point. Note that if the camera setup
associated with the stereo model contains the covariance matrices for the
camera parameters, these covariance matrices are considered in the
computation of CovWPCovWPCovWPCovWPCovWPcovWP too.
If the stereo model has a valid bounding box set (see
set_stereo_model_paramset_stereo_model_paramSetStereoModelParamset_stereo_model_paramSetStereoModelParamSetStereoModelParam), the resulting points are clipped to this
bounding box, i.e., points outside it are not returned. If the bounding box
associated to the stereo model is invalid, it is ignored and all points
that could be reconstructed are returned.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Handle of the stereo model.
RowRowRowRowRowrow (input_control) number(-array) → HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)
Row coordinates of the detected points.
Column coordinates of the detected points.
Covariance matrices of the detected points.
Default value: []
Indices of the observing cameras.
Suggested values: 0, 1, 2
Indices of the observed world points.
Suggested values: 0, 1, 2
XXXXXx (output_control) real(-array) → HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)
X coordinates of the reconstructed 3D points.
YYYYYy (output_control) number(-array) → HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)
Y coordinates of the reconstructed 3D points.
ZZZZZz (output_control) number(-array) → HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)
Z coordinates of the reconstructed 3D points.
Covariance matrices of the reconstructed 3D points.
Indices of the reconstructed 3D points.
reconstruct_surface_stereoreconstruct_surface_stereoReconstructSurfaceStereoreconstruct_surface_stereoReconstructSurfaceStereoReconstructSurfaceStereo,
intersect_lines_of_sightintersect_lines_of_sightIntersectLinesOfSightintersect_lines_of_sightIntersectLinesOfSightIntersectLinesOfSight
3D Metrology