Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

do the threshold and the kernel size in Canny matter?

I am trying to learn how to make edge detection, so i referred to some tutorials such as the one in this link I followed the steps as stated but what i could not understand is the last four parameters set to the function of .Canny()!! I manipulated the parameters but i always get the same results and i could not notice any difference in the output. would you please explain what are these parameters really doing? and how to realize their effect

code:

//step 1
this.mMatGray = new Mat();
Imgproc.cvtColor(this.mMatInputFrame, this.mMatGray, Imgproc.COLOR_BGR2GRAY);

//step 2
this.mMatEdges = new Mat();
Imgproc.blur(this.mMatGray, this.mMatEdges, new Size(5, 5));

//step 3
Imgproc.Canny(this.mMatEdges, this.mMatEdges, 100, 1, 5, true);

do the threshold and the kernel size in Canny matter?Regarding understanding Canny's parameters?

I am trying to learn how to make edge detection, so i referred to some tutorials such as the one in this link I followed the steps as stated but what i could not understand is the last four parameters set to the function of .Canny()!! I manipulated the parameters but i always get the same results and i could not notice any difference in the output. would you please explain what are these parameters really doing? and how to realize their effect

code:

//step 1
this.mMatGray = new Mat();
Imgproc.cvtColor(this.mMatInputFrame, this.mMatGray, Imgproc.COLOR_BGR2GRAY);

//step 2
this.mMatEdges = new Mat();
Imgproc.blur(this.mMatGray, this.mMatEdges, new Size(5, 5));

//step 3
Imgproc.Canny(this.mMatEdges, this.mMatEdges, 100, 1, 5, true);

Regarding understanding Canny's parameters?

I am trying to learn how to make edge detection, so i referred to some tutorials such as the one in this link I followed the steps as stated but what i could not understand is the last four parameters set to the function of .Canny()!! I manipulated the parameters but i always get the same results and i could not notice any difference in the output. would you please explain what are these parameters really doing? and how to realize their effect

code:

//step 1
this.mMatGray = new Mat();
Imgproc.cvtColor(this.mMatInputFrame, this.mMatGray, Imgproc.COLOR_BGR2GRAY);

//step 2
this.mMatEdges = new Mat();
Imgproc.blur(this.mMatGray, this.mMatEdges, new Size(5, 5));

//step 3
Imgproc.Canny(this.mMatEdges, this.mMatEdges, 100, 1, 5, true);