Ask Your Question

mb's profile - activity

2019-09-01 21:36:51 -0600 received badge  Famous Question (source)
2015-05-15 17:25:10 -0600 received badge  Notable Question (source)
2014-10-16 22:10:50 -0600 received badge  Popular Question (source)
2014-03-27 12:50:36 -0600 commented answer Is there any problem in using the same src and dst image in filtering functions?

thanks for replying. Yes it looks fine for blur and GaussianBlur, but for bilateralBlur it gives me this:

OpenCV Error: Assertion failed ((src.type() == CV_8UC1 || src.type() == CV_8UC3) && src.type() == dst.type() && src.size() == dst.size() && src.data != dst.data) in bilateralFilter_8u, file /build/opencv/src/opencv-2.4.7/modules/imgproc/src/smooth.cpp, line 1925 terminate called after throwing an instance of 'cv::Exception' what(): /build/opencv/src/opencv-2.4.7/modules/imgproc/src/smooth.cpp:1925: error: (-215) (src.type() == CV_8UC1 || src.type() == CV_8UC3) && src.type() == dst.type() && src.size() == dst.size() && src.data != dst.data in function bilateralFilter_8u

2014-03-27 05:03:07 -0600 asked a question Is there any problem in using the same src and dst image in filtering functions?

Filtering operations can't be done in the same image since the convolution needs points at already processed positions right? And if I update the same image I get that i'm convolutiong using filtered values instead of original ones. The question is: are the opencv functions like GaussianBlur(.), blur(.), medianBlur(.), bilateralBlur(.) and so on safe to this issue? (doeas opencv create a temporary second matrix internally?) In other words Can I set the "src" and "dst" parameters to the same Mat reference?

ps. I'm writing in C++