Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

How do I draw a path that traces obstacles?

Status
Not open for further replies.

jimsmits

Computer
Mar 12, 2020
2
0
0
US
Hello, I am working on a robot that needs to follow a path to surround two dimensional objects. The system will take a picture of an object that has cutouts. This picture will be converted to grayscale and a path needs to be generated that traces each dark part of the picture along the shortest continuous path with a given offset to not come to close to any given object. This is outside my area of expertise, so I am not sure how to get started. I am hopeful someone here can point me in the right direction!

Image attached for clarity.
Untitled_rci0zv.png
 
Replies continue below

Recommended for you

No, not course work -- we are actually trying to build a robot to glue pieces of foam together in layers.

I have written a simple app for edge detection, but the path thing has been stumping me. Thanks for your input, though, that sends me in a good direction.

Edit FWIW, I have attached an image of some of the complexities that will be involved.
sample.jpg_wncc8v.png
 
OK, one thing that some people typically do, is to force the algorithm to ALWAYS go in the same direction, CW or CCW; this is often used for maze following, you follow your left, or right, hand wall to ensure that you don't miss anything. It's less efficient, but avoids skipping over things because you switched convention.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
If your second picture is more typical of the ratio of cut outs to separation then the time you save from an optimised path between adjacent cutouts is small compared with the time saved from doing the cutouts in the right order. So it becomes our old friend the travelling salesman problem.

Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376
 
Status
Not open for further replies.
Back
Top