GaussianBlur in-place filtering
The documentation for the GaussianBlur method claims that it supports in-place filtering, but I get different results depending on whether the commented line is included. I can not determine why this should happen. Can anyone give me any feedback?
void findEdges(const Mat &src, Mat &destination, Size blur, float sigmaX, float sigmaY, int lowThresh, int highThresh) {
Mat foo = src.clone();
flip(foo, destination, 1);
Mat foo2 = destination.clone();
cvtColor(foo2, destination, COLOR_BGR2GRAY);
Mat foo3 = destination.clone();
// foo3 = destination;
GaussianBlur(foo3, destination, blur, sigmaX, sigmaY);
Mat foo4 = destination.clone();
Canny(foo4, destination, lowThresh, highThresh);
}
I have tested your code and it works fine. If I sum up the image in the different scenarios I'm getting the same values
so what are your results?
I get different results for the same image (4.62072e+7, 4.65682e+7). I am running OpenCV 3.3 with Visual Studio 2015 (opencv-3.3.0-vc14.exe).
that's strange. Now I played a little bit with the parameters sigmaxy. If sigmaxy = 0 everything is fine and the output is the same. If sigmaxy is e.g. "5" I also get different results. Sorry I have no idea. Maybe someone else knows more