• Create Account

# sorting edge detected points

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

5 replies to this topic

### #1heh65532  Members   -  Reputation: 150

Like
0Likes
Like

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

### #2WavyVirus  Members   -  Reputation: 735

Like
0Likes
Like

Posted 16 June 2012 - 07:09 PM

In which order do you expect the points to be?

Are you talking about Canny/Sobel style edge detection? If so, I'm not sure what you mean by 'linear order'.

### #3heh65532  Members   -  Reputation: 150

Like
0Likes
Like

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.

### #4WavyVirus  Members   -  Reputation: 735

Like
0Likes
Like

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"?

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.

### #5jameszhao00  Members   -  Reputation: 271

Like
0Likes
Like

Posted 27 June 2012 - 04:32 PM

Group edgels into chains:
• Tangent direction is 90

• 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.

### #6heh65532  Members   -  Reputation: 150

Like
0Likes
Like

Posted 02 July 2012 - 10:50 PM

i don't know for sure if this is what i need. i'm not making edges into chains as they already are chains.. but the edge pixels into chains.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS