File tree Expand file tree Collapse file tree 5 files changed +22
-10
lines changed Expand file tree Collapse file tree 5 files changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -359,9 +359,12 @@ namespace cv
359
359
};
360
360
protected:
361
361
// arrays used in the region removal
362
- int *specklePointX;
363
- int *specklePointY;
364
- long long *pus;
362
+ Mat speckleY;
363
+ Mat speckleX;
364
+ Mat puss;
365
+ // int *specklePointX;
366
+ // int *specklePointY;
367
+ // long long *pus;
365
368
int previous_size;
366
369
// !method for setting the maximum disparity
367
370
void setMaxDisparity (int val)
@@ -470,6 +473,9 @@ namespace cv
470
473
CV_Assert (currentMap.cols == out.cols );
471
474
CV_Assert (currentMap.rows == out.rows );
472
475
CV_Assert (t >= 0 );
476
+ int *pus = (int *)puss.data ;
477
+ int *specklePointX = (int *)speckleX.data ;
478
+ int *specklePointY = (int *)speckleY.data ;
473
479
memset (pus, 0 , previous_size * sizeof (pus[0 ]));
474
480
uint8_t *map = currentMap.data ;
475
481
uint8_t *outputMap = out.data ;
Original file line number Diff line number Diff line change @@ -328,9 +328,9 @@ namespace cv
328
328
if (previous_size != width * height)
329
329
{
330
330
previous_size = width * height;
331
- specklePointX = new int [width * height] ;
332
- specklePointY = new int [width * height] ;
333
- pus = new long long [width * height] ;
331
+ speckleX. create ( height,width,CV_32SC4) ;
332
+ speckleY. create ( height,width,CV_32SC4) ;
333
+ puss. create ( height,width,CV_32SC4) ;
334
334
335
335
censusImage[0 ].create (left0.rows ,left0.cols ,CV_32SC4);
336
336
censusImage[1 ].create (left0.rows ,left0.cols ,CV_32SC4);
Original file line number Diff line number Diff line change @@ -697,9 +697,9 @@ namespace cv
697
697
if (previous_size != width * height)
698
698
{
699
699
previous_size = width * height;
700
- specklePointX = new int [width * height] ;
701
- specklePointY = new int [width * height] ;
702
- pus = new long long [width * height] ;
700
+ speckleX. create ( height,width,CV_32SC4) ;
701
+ speckleY. create ( height,width,CV_32SC4) ;
702
+ puss. create ( height,width,CV_32SC4) ;
703
703
}
704
704
double minVal; double maxVal;
705
705
Mat imgDisparity8U2;
Original file line number Diff line number Diff line change @@ -84,6 +84,9 @@ void CV_BlockMatchingTest::run(int )
84
84
{
85
85
Mat image1, image2, gt;
86
86
// some test images can be found in the test data folder
87
+ // in order for the tests to build succesfully please replace
88
+ // ts->get_data_path() + "testdata/imL2l.bmp with the path from your disk
89
+ // for example if your images are on D:\\ , please write D:\\testdata\\imL2l.bmp
87
90
image1 = imread (ts->get_data_path () + " testdata/imL2l.bmp" , CV_8UC1);
88
91
image2 = imread (ts->get_data_path () + " testdata/imL2.bmp" , CV_8UC1);
89
92
gt = imread (ts->get_data_path () + " testdata/groundtruth.bmp" , CV_8UC1);
Original file line number Diff line number Diff line change @@ -115,7 +115,10 @@ CV_DescriptorBaseTest::~CV_DescriptorBaseTest()
115
115
CV_DescriptorBaseTest::CV_DescriptorBaseTest ()
116
116
{
117
117
// read 2 images from file
118
- // two test images can be found in the test data folder
118
+ // some test images can be found in the test data folder
119
+ // in order for the tests to build succesfully please replace
120
+ // ts->get_data_path() + "testdata/imL2l.bmp with the path from your disk
121
+ // for example if your images are on D:\\ , please write D:\\testdata\\imL2l.bmp
119
122
left = imread (ts->get_data_path () + " testdata/imL2l.bmp" , CV_8UC1);
120
123
right = imread (ts->get_data_path () + " testdata/imL2.bmp" , CV_8UC1);
121
124
You can’t perform that action at this time.
0 commit comments