OpenCV  4.10.0-dev
Open Source Computer Vision
Loading...
Searching...
No Matches
Classes | Functions

Detailed Description

Classes

class  cv::cuda::DisparityBilateralFilter
 Class refining a disparity map using joint bilateral filtering. : More...
 
class  cv::cuda::StereoBeliefPropagation
 Class computing stereo correspondence using the belief propagation algorithm. : More...
 
class  cv::cuda::StereoBM
 Class computing stereo correspondence (disparity map) using the block matching algorithm. : More...
 
class  cv::cuda::StereoConstantSpaceBP
 Class computing stereo correspondence using the constant space belief propagation algorithm. : More...
 
class  cv::cuda::StereoSGM
 The class implements the modified H. Hirschmuller algorithm [126]. Limitation and difference are as follows: More...
 

Functions

Ptr< cuda::DisparityBilateralFiltercv::cuda::createDisparityBilateralFilter (int ndisp=64, int radius=3, int iters=1)
 Creates DisparityBilateralFilter object.
 
Ptr< cuda::StereoBeliefPropagationcv::cuda::createStereoBeliefPropagation (int ndisp=64, int iters=5, int levels=5, int msg_type=CV_32F)
 Creates StereoBeliefPropagation object.
 
Ptr< cuda::StereoBMcv::cuda::createStereoBM (int numDisparities=64, int blockSize=19)
 Creates StereoBM object.
 
Ptr< cuda::StereoConstantSpaceBPcv::cuda::createStereoConstantSpaceBP (int ndisp=128, int iters=8, int levels=4, int nr_plane=4, int msg_type=CV_32F)
 Creates StereoConstantSpaceBP object.
 
Ptr< cuda::StereoSGMcv::cuda::createStereoSGM (int minDisparity=0, int numDisparities=128, int P1=10, int P2=120, int uniquenessRatio=5, int mode=cv::cuda::StereoSGM::MODE_HH4)
 Creates StereoSGM object.
 
void cv::cuda::drawColorDisp (InputArray src_disp, OutputArray dst_disp, int ndisp, Stream &stream=Stream::Null())
 Colors a disparity image.
 
void cv::cuda::reprojectImageTo3D (GpuMat disp, GpuMat &xyzw, Mat Q, int dst_cn=4, Stream &stream=Stream::Null())
 
void cv::cuda::reprojectImageTo3D (InputArray disp, OutputArray xyzw, InputArray Q, int dst_cn=4, Stream &stream=Stream::Null())
 Reprojects a disparity image to 3D space.
 

Function Documentation

◆ createDisparityBilateralFilter()

Ptr< cuda::DisparityBilateralFilter > cv::cuda::createDisparityBilateralFilter ( int  ndisp = 64,
int  radius = 3,
int  iters = 1 
)

#include <opencv2/cudastereo.hpp>

Creates DisparityBilateralFilter object.

Parameters
ndispNumber of disparities.
radiusFilter radius.
itersNumber of iterations.

◆ createStereoBeliefPropagation()

Ptr< cuda::StereoBeliefPropagation > cv::cuda::createStereoBeliefPropagation ( int  ndisp = 64,
int  iters = 5,
int  levels = 5,
int  msg_type = CV_32F 
)

#include <opencv2/cudastereo.hpp>

Creates StereoBeliefPropagation object.

Parameters
ndispNumber of disparities.
itersNumber of BP iterations on each level.
levelsNumber of levels.
msg_typeType for messages. CV_16SC1 and CV_32FC1 types are supported.

◆ createStereoBM()

Ptr< cuda::StereoBM > cv::cuda::createStereoBM ( int  numDisparities = 64,
int  blockSize = 19 
)

#include <opencv2/cudastereo.hpp>

Creates StereoBM object.

Parameters
numDisparitiesthe disparity search range. For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to numDisparities. The search range can then be shifted by changing the minimum disparity.
blockSizethe linear size of the blocks compared by the algorithm. The size should be odd (as the block is centered at the current pixel). Larger block size implies smoother, though less accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher chance for algorithm to find a wrong correspondence.

◆ createStereoConstantSpaceBP()

Ptr< cuda::StereoConstantSpaceBP > cv::cuda::createStereoConstantSpaceBP ( int  ndisp = 128,
int  iters = 8,
int  levels = 4,
int  nr_plane = 4,
int  msg_type = CV_32F 
)

#include <opencv2/cudastereo.hpp>

Creates StereoConstantSpaceBP object.

Parameters
ndispNumber of disparities.
itersNumber of BP iterations on each level.
levelsNumber of levels.
nr_planeNumber of disparity levels on the first level.
msg_typeType for messages. CV_16SC1 and CV_32FC1 types are supported.

◆ createStereoSGM()

Ptr< cuda::StereoSGM > cv::cuda::createStereoSGM ( int  minDisparity = 0,
int  numDisparities = 128,
int  P1 = 10,
int  P2 = 120,
int  uniquenessRatio = 5,
int  mode = cv::cuda::StereoSGM::MODE_HH4 
)

#include <opencv2/cudastereo.hpp>

Creates StereoSGM object.

Parameters
minDisparityMinimum possible disparity value. Normally, it is zero but sometimes rectification algorithms can shift images, so this parameter needs to be adjusted accordingly.
numDisparitiesMaximum disparity minus minimum disparity. The value must be 64, 128 or 256.
P1The first parameter controlling the disparity smoothness.This parameter is used for the case of slanted surfaces (not fronto parallel).
P2The second parameter controlling the disparity smoothness.This parameter is used for "solving" the depth discontinuities problem.
uniquenessRatioMargin in percentage by which the best (minimum) computed cost function value should "win" the second best value to consider the found match correct. Normally, a value within the 5-15 range is good enough.
modeSet it to StereoSGM::MODE_HH to run the full-scale two-pass dynamic programming algorithm. It will consume O(W*H*numDisparities) bytes. By default, it is set to StereoSGM::MODE_HH4.

◆ drawColorDisp()

void cv::cuda::drawColorDisp ( InputArray  src_disp,
OutputArray  dst_disp,
int  ndisp,
Stream stream = Stream::Null() 
)

#include <opencv2/cudastereo.hpp>

Colors a disparity image.

Parameters
src_dispInput single-channel 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit floating-point disparity image. If 16-bit signed format is used, the values are assumed to have no fractional bits.
dst_dispOutput disparity image. It has the same size as src_disp. The type is CV_8UC4 in BGRA format (alpha = 255).
ndispNumber of disparities.
streamStream for the asynchronous version.

This function draws a colored disparity map by converting disparity values from [0..ndisp) interval first to HSV color space (where different disparity values correspond to different hues) and then converting the pixels to RGB for visualization.

◆ reprojectImageTo3D() [1/2]

void cv::cuda::reprojectImageTo3D ( GpuMat  disp,
GpuMat xyzw,
Mat  Q,
int  dst_cn = 4,
Stream stream = Stream::Null() 
)
inline

#include <opencv2/cudastereo.hpp>

Here is the call graph for this function:

◆ reprojectImageTo3D() [2/2]

void cv::cuda::reprojectImageTo3D ( InputArray  disp,
OutputArray  xyzw,
InputArray  Q,
int  dst_cn = 4,
Stream stream = Stream::Null() 
)

#include <opencv2/cudastereo.hpp>

Reprojects a disparity image to 3D space.

Parameters
dispInput single-channel 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit floating-point disparity image. If 16-bit signed format is used, the values are assumed to have no fractional bits.
xyzwOutput 3- or 4-channel floating-point image of the same size as disp . Each element of xyzw(x,y) contains 3D coordinates (x,y,z) or (x,y,z,1) of the point (x,y) , computed from the disparity map.
Q\(4 \times 4\) perspective transformation matrix that can be obtained via stereoRectify .
dst_cnThe number of channels for output image. Can be 3 or 4.
streamStream for the asynchronous version.
See also
reprojectImageTo3D