Skip to content

Commit a83b78e

Browse files
LaurentBergeralalek
authored andcommitted
Merge pull request #1709 from LaurentBerger/BM3D_STEPALL
* Process InputOutputArray when BM3D_STEPALL is set * Step1 created if needed- noArray in test
1 parent e38c550 commit a83b78e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

modules/xphoto/src/bm3d_image_denoising.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ void bm3dDenoising(
148148
_dst.create(srcSize, type);
149149
break;
150150
case BM3D_STEPALL:
151+
if (_basic.needed())
152+
_basic.create(srcSize, type);
151153
_dst.create(srcSize, type);
152154
break;
153155
default:

modules/xphoto/test/test_denoise_bm3d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ namespace opencv_test { namespace {
7676

7777
// BM3D: two different calls doing exactly the same thing
7878
cv::Mat result, resultSec;
79-
cv::xphoto::bm3dDenoising(original, cv::Mat(), resultSec, 10, 4, 16, 2500, 400, 8, 1, 0.0f, cv::NORM_L2, cv::xphoto::BM3D_STEPALL);
79+
cv::xphoto::bm3dDenoising(original, noArray(), resultSec, 10, 4, 16, 2500, 400, 8, 1, 0.0f, cv::NORM_L2, cv::xphoto::BM3D_STEPALL);
8080
cv::xphoto::bm3dDenoising(original, result, 10, 4, 16, 2500, 400, 8, 1, 0.0f, cv::NORM_L2, cv::xphoto::BM3D_STEPALL);
8181

8282
DUMP(result, expected_path + ".res.png");

0 commit comments

Comments
 (0)