Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between a Line and an Edge in image detection?

We have been learning about methods like Sobel and Roberts' convolution matrices to detect edges within images, extending to the Canny method to clear them up. But now, we are learning about 'Line' detection, as opposed to 'Edge' detection - with methods like Hough Transform.

Problem is - I've no idea how to even conceptualize the difference between a 'Line' and an 'Edge'. Can someone explain this difference to me without the use of complex mathematical equations etc?

like image 757
j panton Avatar asked Mar 07 '23 05:03

j panton


2 Answers

An edge is a transition from one phase/object/thing to another. On one side you have one color, on the other side you have another color. Or on one side you have foreground, and on the other side you have background.

A line is a 1D structure. It has the same phase/object/thing on either side. On one side you have background, on the other side you have background also.

visual example

A gradient magnitude filter turns an edge into a line.

An edge has a direction (the normal), a line has an orientation (if you rotate it by 180 degrees, it looks the same).

You can think of a line as being two opposite edges very close together.

Lines and edges are both local properties of an image. Any sufficiently small portion of an image will appear as either an edge or a line.

They are both locally straight, since something curved, considered in a sufficiently small region, will appear straight.

like image 78
Cris Luengo Avatar answered Mar 08 '23 20:03

Cris Luengo


Methods like Sobel and Roberts help you to detect edges in the image. Methods like Hough Transform help to identify if these edges are actually geometrical shapes such as lines, circles and ellipses.

like image 31
elarmando Avatar answered Mar 08 '23 21:03

elarmando