Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It seems some bugs in your code

First

The function cv::Mat smther(cv::Mat &rfd) should return the resultant Mat like,

cv::Mat smther(cv::Mat &rfd){

 medianBlur( rfd, rfd, 9);
 return rfd;

}

And secondly,

in function cv::Mat thresh_callback(cv::Mat &dst) you should pass your function argument to Canny(), also you should return the resultant Mat, as your using it in the function call.

So change your code to

cv::Mat thresh_callback(cv::Mat &dst){
.................................
.................................
Canny( dst, canny_output, thresh, thresh*2, 3 );
.................................
.................................
 return drawing;
}

Hope this will solve your problem,