Detect only important edges using canny edge detector

asked 2018-04-04 12:13:07 -0500

Safa gravatar image

updated 2018-04-04 17:36:46 -0500

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. image description

edit retag flag offensive close merge delete

Comments

Did you try the dilate function?

sjhalayka gravatar imagesjhalayka ( 2018-04-04 13:03:30 -0500 )edit

To extend on @sjhalayka, you want to perform some sort of morphological operation for noise removal before edge detection.

eshirima gravatar imageeshirima ( 2018-04-04 13:20:30 -0500 )edit
1

What is an important edge? you can increase canny threshold or try this deriche_demo in opencv_contrib

LBerger gravatar imageLBerger ( 2018-04-04 15:22:55 -0500 )edit