@@ -147,12 +147,6 @@ namespace cv
147
147
virtual int getSmallerBlockSize () const = 0;
148
148
virtual void setSmallerBlockSize (int blockSize) = 0;
149
149
150
- virtual Rect getROI1 () const = 0;
151
- virtual void setROI1 (Rect roi1) = 0;
152
-
153
- virtual Rect getROI2 () const = 0;
154
- virtual void setROI2 (Rect roi2) = 0;
155
-
156
150
virtual int getScalleFactor () const = 0 ;
157
151
virtual void setScalleFactor (int factor) = 0;
158
152
@@ -233,9 +227,9 @@ namespace cv
233
227
zero. In the current implementation, this parameter must be divisible by 16.
234
228
@param blockSize Matched block size. It must be an odd number \>=1 . Normally, it should be
235
229
somewhere in the 3..11 range.
236
- @param P1 The first parameter controlling the disparity smoothness. See below .
237
- @param P2 The second parameter controlling the disparity smoothness. The larger the values are,
238
- the smoother the disparity is. P1 is the penalty on the disparity change by plus or minus 1
230
+ @param P1 The first parameter controlling the disparity smoothness.This parameter is used for the case of slanted surfaces (not fronto parallel) .
231
+ @param P2 The second parameter controlling the disparity smoothness.This parameter is used for "solving" the depth discontinuities problem.
232
+ The larger the values are, the smoother the disparity is. P1 is the penalty on the disparity change by plus or minus 1
239
233
between neighbor pixels. P2 is the penalty on the disparity change by more than 1 between neighbor
240
234
pixels. The algorithm requires P2 \> P1 . See stereo_match.cpp sample where some reasonably good
241
235
P1 and P2 values are shown (like 8\*number_of_image_channels\*SADWindowSize\*SADWindowSize and
@@ -263,7 +257,7 @@ namespace cv
263
257
to a custom value.
264
258
*/
265
259
CV_EXPORTS static Ptr<cv::stereo::StereoBinarySGBM> create (int minDisparity, int numDisparities, int blockSize,
266
- int P1 = 0 , int P2 = 0 , int disp12MaxDiff = 0 ,
260
+ int P1 = 100 , int P2 = 1000 , int disp12MaxDiff = 0 ,
267
261
int preFilterCap = 0 , int uniquenessRatio = 0 ,
268
262
int speckleWindowSize = 0 , int speckleRange = 0 ,
269
263
int mode = StereoBinarySGBM::MODE_SGBM);
0 commit comments