-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Process InputOutputArray when BM3D_STEPALL is set #1709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
certainly with my lack of experience & understanding, now should I rebuild opencv with opencv_contrib module ?? |
@@ -148,6 +148,7 @@ void bm3dDenoising( | |||
_dst.create(srcSize, type); | |||
break; | |||
case BM3D_STEPALL: | |||
_basic.create(srcSize, type); | |||
_dst.create(srcSize, type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look on line 159.
Perhaps this should be guarded: if (_basic.needed()) basic.create(...);
@@ -76,7 +76,7 @@ namespace opencv_test { namespace { | |||
|
|||
// BM3D: two different calls doing exactly the same thing | |||
cv::Mat result, resultSec; | |||
cv::xphoto::bm3dDenoising(original, cv::Mat(), resultSec, 10, 4, 16, 2500, 400, 8, 1, 0.0f, cv::NORM_L2, cv::xphoto::BM3D_STEPALL); | |||
cv::xphoto::bm3dDenoising(original, result, resultSec, 10, 4, 16, 2500, 400, 8, 1, 0.0f, cv::NORM_L2, cv::xphoto::BM3D_STEPALL); | |||
cv::xphoto::bm3dDenoising(original, result, 10, 4, 16, 2500, 400, 8, 1, 0.0f, cv::NORM_L2, cv::xphoto::BM3D_STEPALL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not use "result" twice. It is not guaranteed that it is updated by second call.
Perhaps we should leave tests "as is" or replace Mat()
to noArray()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
solves http://answers.opencv.org/question/196559/after-applying-cvxphotobm3ddenoising-imshow-is-giving-insertion-error/