Class cv::cuda::StereoBeliefPropagation#
Class computing stereo correspondence using the belief propagation algorithm. : View details
#include <opencv2/cudastereo.hpp>Collaboration diagram for cv::cuda::StereoBeliefPropagation:
Public Member Functions#
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Detailed Description#
Class computing stereo correspondence using the belief propagation algorithm. :
The class implements algorithm described in Felzenszwalb2006 . It can compute own data cost (using a truncated linear model) or use a user-provided data cost.
and for data cost storage:
width_step is the number of bytes in a line including padding.
StereoBeliefPropagation uses a truncated linear model for the data cost and discontinuity terms:
For more details, see Felzenszwalb2006 .
By default, StereoBeliefPropagation uses floating-point arithmetics and the CV_32FC1 type for messages. But it can also use fixed-point arithmetics and the CV_16SC1 message type for better performance. To avoid an overflow in this case, the parameters must satisfy the following requirement:
See also
StereoMatcher
Note
StereoBeliefPropagation requires a lot of memory for message storage:
Member Function Documentation#
compute()#
void cv::cuda::StereoBeliefPropagation::compute(
InputArray data,
OutputArray disparity,
Stream & stream = Stream::Null() )
Enables the stereo correspondence operator that finds the disparity for the specified data cost.
Parameters
data— User-specified data cost, a matrix of msg_type type and Size(*ndisp, ) size. disparity— Output disparity map. If disparity is empty, the output type is CV_16SC1 . Otherwise, the type is retained. In 16-bit signed format, the disparity values do not have fractional bits.stream— Stream for the asynchronous version.
compute()#
void cv::cuda::StereoBeliefPropagation::compute(
InputArray left,
InputArray right,
OutputArray disparity,
Stream & stream )
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
getDataWeight()#
double cv::cuda::StereoBeliefPropagation::getDataWeight()
data weight
getDiscSingleJump()#
double cv::cuda::StereoBeliefPropagation::getDiscSingleJump()
discontinuity single jump
getMaxDataTerm()#
double cv::cuda::StereoBeliefPropagation::getMaxDataTerm()
truncation of data cost
getMaxDiscTerm()#
double cv::cuda::StereoBeliefPropagation::getMaxDiscTerm()
truncation of discontinuity cost
getMsgType()#
int cv::cuda::StereoBeliefPropagation::getMsgType()
type for messages (CV_16SC1 or CV_32FC1)
getNumIters()#
int cv::cuda::StereoBeliefPropagation::getNumIters()
number of BP iterations on each level
getNumLevels()#
int cv::cuda::StereoBeliefPropagation::getNumLevels()
number of levels
setDataWeight()#
void cv::cuda::StereoBeliefPropagation::setDataWeight(double data_weight)
setDiscSingleJump()#
void cv::cuda::StereoBeliefPropagation::setDiscSingleJump(double disc_single_jump)
setMaxDataTerm()#
void cv::cuda::StereoBeliefPropagation::setMaxDataTerm(double max_data_term)
setMaxDiscTerm()#
void cv::cuda::StereoBeliefPropagation::setMaxDiscTerm(double max_disc_term)
setMsgType()#
void cv::cuda::StereoBeliefPropagation::setMsgType(int msg_type)
setNumIters()#
void cv::cuda::StereoBeliefPropagation::setNumIters(int iters)
setNumLevels()#
void cv::cuda::StereoBeliefPropagation::setNumLevels(int levels)
estimateRecommendedParams()#
static void cv::cuda::StereoBeliefPropagation::estimateRecommendedParams(
int width,
int height,
int & ndisp,
int & iters,
int & levels )
Uses a heuristic method to compute the recommended parameters ( ndisp, iters and levels ) for the specified image size ( width and height ).
Source file#
The documentation for this class was generated from the following file:
opencv2/cudastereo.hpp