**0**

# sorting edge detected points

Started by heh65532, Jun 16 2012 06:29 PM

5 replies to this topic

###
#1
Members - Reputation: **150**

Posted 16 June 2012 - 06:29 PM

hi

how do you find in which order are the points in the result of edge detection?

i need to run iteration on the result of edge detected points but the result doesnt have the points in linear order.

so is there a better way to detect edge inorder to have them in linear order, or some good logic to put the points in order?

thanks

how do you find in which order are the points in the result of edge detection?

i need to run iteration on the result of edge detected points but the result doesnt have the points in linear order.

so is there a better way to detect edge inorder to have them in linear order, or some good logic to put the points in order?

thanks

Sponsor:

###
#3
Members - Reputation: **150**

Posted 16 June 2012 - 10:36 PM

by linear i mean path around the image.

i just made very simple edge detection that loops X and Y and detects edges. and i thought there could be better way. and this method like i mentioned earlier leaves the points/edge found in the order it was found by X,Y coords in the loop.

i just made very simple edge detection that loops X and Y and detects edges. and i thought there could be better way. and this method like i mentioned earlier leaves the points/edge found in the order it was found by X,Y coords in the loop.

###
#4
Members - Reputation: **735**

Posted 27 June 2012 - 03:12 PM

I think you will need to be much more detailed in describing what you are trying to achieve, as "edge detection" has a specific meaning in image processing, and I can't follow what you are trying to do.

What is the "path around the image"? This just makes me think of a rectangle surrounding an image.

What do you mean by "loops X and Y and detects edges"?

Can you provide images/diagrams/examples?

What is the "path around the image"? This just makes me think of a rectangle surrounding an image.

What do you mean by "loops X and Y and detects edges"?

By "edge", do you mean you have something like a black and white image where all black pixels are "edges"? You could start with one pixel and then check its neighbours, adding any black pixels to the list as you go... but which pixel do you start with? Does your image only contain one-pixel-thick lines? Can they cross or split? We need this information.

Can you provide images/diagrams/examples?

**Edited by WavyVirus, 27 June 2012 - 03:20 PM.**

###
#5
Members - Reputation: **271**

Posted 27 June 2012 - 04:32 PM

Are you talking about edge linking?

Group edgels into chains:

• Tangent direction is 90

◦

rotated from the gradient direction.

• Record “next” and “previous” edgels at each edge (think of a doubly-linked list) —

the edges “ahead” and “behind” the current one.

• Resolving ambiguities:

– Find candidates for linking based on consistency of position and orientation.

– If there are two candidates ahead (or behind) and they are consistent with each

other, choose the four-connected neighbor ﬁrst

– If they aren’t consistent, then this is a branching location. We can either

∗ Terminate the chain or

∗ Attempt to ﬁnd the stronger link and continue it.

• Result is a series of edgel chains.

http://www.cs.rpi.edu//~stewart/cv_2011/lec04-05.pdf

You can probably parallelize it. Off the top of my mind you can probably link edges in sccessively down sampled edge representations. Store edges in a per-pixel linked list.

For example, in iteration 1 each 2x2 quad contains a bunch of edges, in iteration 2 you connect neighboring edge chains to form edge chains in 4x4 quad.

Group edgels into chains:

• Tangent direction is 90

◦

rotated from the gradient direction.

• Record “next” and “previous” edgels at each edge (think of a doubly-linked list) —

the edges “ahead” and “behind” the current one.

• Resolving ambiguities:

– Find candidates for linking based on consistency of position and orientation.

– If there are two candidates ahead (or behind) and they are consistent with each

other, choose the four-connected neighbor ﬁrst

– If they aren’t consistent, then this is a branching location. We can either

∗ Terminate the chain or

∗ Attempt to ﬁnd the stronger link and continue it.

• Result is a series of edgel chains.

http://www.cs.rpi.edu//~stewart/cv_2011/lec04-05.pdf

You can probably parallelize it. Off the top of my mind you can probably link edges in sccessively down sampled edge representations. Store edges in a per-pixel linked list.

For example, in iteration 1 each 2x2 quad contains a bunch of edges, in iteration 2 you connect neighboring edge chains to form edge chains in 4x4 quad.