OpenCV  4.7.0-dev
Open Source Computer Vision
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cv::stereo::QuasiDenseStereo Class Referenceabstract

Class containing the methods needed for Quasi Dense Stereo computation. More...

#include <opencv2/stereo/quasi_dense_stereo.hpp>

Public Member Functions

virtual ~QuasiDenseStereo ()=0
 destructor Method to free all the memory allocated by matrices and vectors in this class. More...
 
virtual void getDenseMatches (std::vector< MatchQuasiDense > &denseMatches)=0
 Get The dense corresponding points. More...
 
virtual cv::Mat getDisparity ()=0
 Compute and return the disparity map based on the correspondences found in the "process" method. More...
 
virtual cv::Point2f getMatch (const int x, const int y)=0
 Specify pixel coordinates in the left image and get its corresponding location in the right image. More...
 
virtual void getSparseMatches (std::vector< MatchQuasiDense > &sMatches)=0
 Get The sparse corresponding points. More...
 
virtual int loadParameters (cv::String filepath)=0
 Load a file containing the configuration parameters of the class. More...
 
virtual void process (const cv::Mat &imgLeft, const cv::Mat &imgRight)=0
 Main process of the algorithm. This method computes the sparse seeds and then densifies them. More...
 
virtual int saveParameters (cv::String filepath)=0
 Save a file containing all the configuration parameters the class is currently set to. More...
 

Static Public Member Functions

static cv::Ptr< QuasiDenseStereocreate (cv::Size monoImgSize, cv::String paramFilepath=cv::String())
 

Public Attributes

PropagationParameters Param
 

Detailed Description

Class containing the methods needed for Quasi Dense Stereo computation.

This module contains the code to perform quasi dense stereo matching. The method initially starts with a sparse 3D reconstruction based on feature matching across a stereo image pair and subsequently propagates the structure into neighboring image regions. To obtain initial seed correspondences, the algorithm locates Shi and Tomashi features in the left image of the stereo pair and then tracks them using pyramidal Lucas-Kanade in the right image. To densify the sparse correspondences, the algorithm computes the zero-mean normalized cross-correlation (ZNCC) in small patches around every seed pair and uses it as a quality metric for each match. In this code, we introduce a custom structure to store the location and ZNCC value of correspondences called "Match". Seed Matches are stored in a priority queue sorted according to their ZNCC value, allowing for the best quality Match to be readily available. The algorithm pops Matches and uses them to extract new matches around them. This is done by considering a small neighboring area around each Seed and retrieving correspondences above a certain texture threshold that are not previously computed. New matches are stored in the seed priority queue and used as seeds. The propagation process ends when no additional matches can be retrieved.

See also
This code represents the work presented in [234]. If this code is useful for your work please cite [234].

Also the original growing scheme idea is described in [144]


The documentation for this class was generated from the following file: