Detect only important edges using canny edge detector
Hello, I'm using canny edge detector to detect edges of certain objects in real-time but I only want to detect the outline of the object and not the minor details, I tried to eliminate the noise and smooth the image, I tried converting it to grayscale and applying a Gaussianblur to it but it still picks up a lot of minor details. Are there specific filters I should use for this?
I appreciate any suggestions you might offer.
Update I want the lines to be smoother and I don't want to pick up any noise/ I don't want one line to be considered more than one contour, I don't know how to get the smoothest result possible though.
Did you try the
dilate
function?To extend on @sjhalayka, you want to perform some sort of morphological operation for noise removal before edge detection.
What is an important edge? you can increase canny threshold or try this deriche_demo in opencv_contrib