Table of Contents

Method ReprojectImageTo3D

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ReprojectImageTo3D(InputArray, OutputArray, InputArray, bool, int)

reprojects disparity image to 3D: (x,y,d)->(X,Y,Z) using the matrix Q returned by cv::stereoRectify

public static void ReprojectImageTo3D(InputArray disparity, OutputArray _3dImage, InputArray Q, bool handleMissingValues = false, int ddepth = -1)

Parameters

disparity InputArray

Input single-channel 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit floating-point disparity image.

_3dImage OutputArray

Output 3-channel floating-point image of the same size as disparity. Each element of _3dImage(x,y) contains 3D coordinates of the point (x,y) computed from the disparity map.

Q InputArray

4 x 4 perspective transformation matrix that can be obtained with stereoRectify().

handleMissingValues bool

Indicates, whether the function should handle missing values (i.e. points where the disparity was not computed). If handleMissingValues=true, then pixels with the minimal disparity that corresponds to the outliers (see StereoBM::operator() ) are transformed to 3D points with a very large Z value (currently set to 10000).

ddepth int

he optional output array depth. If it is -1, the output image will have CV_32F depth. ddepth can also be set to CV_16S, CV_32S or CV_32F.