Sign in to follow this  

sorting edge detected points

Recommended Posts

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?


Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites
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"?[left][background=rgb(250, 251, 252)] 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.[/background][/left]

Can you provide images/diagrams/examples? Edited by WavyVirus

Share this post

Link to post
Share on other sites
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.

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this