OpenCV 4.5.3(日本語機械翻訳)
quasi_dense_stereo.hpp
1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html.
4
5 //authors: Danail Stoyanov, Evangelos Mazomenos, Dimitrios Psychogyios
6
7
8 //__OPENCV_QUASI_DENSE_STEREO_H__
9 #ifndef __OPENCV_QUASI_DENSE_STEREO_H__
10 #define __OPENCV_QUASI_DENSE_STEREO_H__
11
12
13
14 #include <opencv2/core.hpp>
15
16
17 namespace cv
18{
19 namespace stereo
20{
26 // A basic match structure
27 struct CV_EXPORTS_W_SIMPLE MatchQuasiDense
28{
29 CV_PROP_RW cv::Point2i p0;
30 CV_PROP_RW cv::Point2i p1;
31 CV_PROP_RW float corr;
32
33 CV_WRAP MatchQuasiDense() { corr = 0; }
34
35 CV_WRAP_AS(apply) bool operator < (const MatchQuasiDense & rhs) const //fixme may be used uninitialized in this function
36 {
37 return this->corr < rhs.corr;
38 }
39};
40 struct CV_EXPORTS_W_SIMPLE PropagationParameters
41{
42 CV_PROP_RW int corrWinSizeX; // similarity window
43 CV_PROP_RW int corrWinSizeY;
44
45 CV_PROP_RW int borderX; // border to ignore
46 CV_PROP_RW int borderY;
47
48 //matching
49 CV_PROP_RW float correlationThreshold; // correlation threshold
50 CV_PROP_RW float textrureThreshold; // texture threshold
51
52 CV_PROP_RW int neighborhoodSize; // neighborhood size
53 CV_PROP_RW int disparityGradient; // disparity gradient threshold
54
55 // Parameters for LK flow algorithm
56 CV_PROP_RW int lkTemplateSize;
57 CV_PROP_RW int lkPyrLvl;
58 CV_PROP_RW int lkTermParam1;
59 CV_PROP_RW float lkTermParam2;
60
61 // Parameters for GFT algorithm.
62 CV_PROP_RW float gftQualityThres;
63 CV_PROP_RW int gftMinSeperationDist;
64 CV_PROP_RW int gftMaxNumFeatures;
65
66};
67
68
95 class CV_EXPORTS_W QuasiDenseStereo
96{
97 public:
102 CV_WRAP virtual ~QuasiDenseStereo() = 0;
103
104
118 CV_WRAP virtual int loadParameters(cv::String filepath) = 0;
119
120
129 CV_WRAP virtual int saveParameters(cv::String filepath) = 0;
130
131
138 CV_WRAP virtual void getSparseMatches(CV_OUT std::vector<MatchQuasiDense> &sMatches) = 0;
139
140
147 CV_WRAP virtual void getDenseMatches(CV_OUT std::vector<MatchQuasiDense> &denseMatches) = 0;
148
149
150
163 CV_WRAP virtual void process(const cv::Mat &imgLeft ,const cv::Mat &imgRight) = 0;
164
165
174 CV_WRAP virtual cv::Point2f getMatch(const int x, const int y) = 0;
175
176
184 CV_WRAP virtual cv::Mat getDisparity() = 0;
185
186
187 CV_WRAP static cv::Ptr<QuasiDenseStereo> create(cv::Size monoImgSize, cv::String paramFilepath = cv::String());
188
189
190 CV_PROP_RW PropagationParameters Param;
191};
192
193} //namespace cv
194} //namespace stereo
195
198 #endif // __OPENCV_QUASI_DENSE_STEREO_H__
n-dimensional dense array class
Definition: mat.hpp:802
Template class for specifying the size of an image or rectangle.
Definition: core/types.hpp:316
Class containing the methods needed for Quasi Dense Stereo computation.
Definition: quasi_dense_stereo.hpp:96
CV_EXPORTS CV_WRAP_AS(goodFeaturesToTrackWithQuality) void goodFeaturesToTrack(InputArray image
Same as above, but returns also quality measure of the detected corners.
cv
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75
Definition: cvstd_wrapper.hpp:74
Definition: quasi_dense_stereo.hpp:28
Definition: quasi_dense_stereo.hpp:41