Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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);

}