OpenCV4Android - BilateralFilter Problems
So I'm attempting to use a bilateralFilter and it's crashing for reasons unknown to me.
I'm following these as a guide and I'm not seeing anything wrong:
http://opencvexamples.blogspot.com/20...
http://docs.opencv.org/2.4/doc/tutori...
private Mat sharpen(Mat passedImage)
{
Mat bilateral = passedImage.clone();
Imgproc.cvtColor(bilateral, bilateral, Imgproc.COLOR_BGRA2BGR);
int iSize = 9;
Imgproc.bilateralFilter(bilateral, bilateral, iSize, iSize*2, iSize/2);
return bilateral;
}
In the documentation of bilateralFilter:
Updated Code to be a 3-Channel but something else must be wrong.
What happens if you use different Mat for input src and output dst?
That did it... Thanks. I didn't even think that might cause a problem.
@berak, I reopened the question for the following reason: if there is not an error report than an explicit internal clone should be made to make this work. I would thus like to know if there was an error in the first case? @Silberlicht, can you enlighten us?