Solved

Short lines create longer lines- algorithm

Posted on 2011-03-07
2
344 Views
Last Modified: 2012-05-11
Hello experts!


I have a set of short (2D) lines (described by their border points).

1. Some of these lines visually create longer lines (please have a look at the image)

2. These longer lines create geometrical figures


Question:

Can you think about any smart algorithm to detect lines created by short lines and then to detect geometrical figures?


Thank you

panJames




 lines lines
0
Comment
Question by:panJames
2 Comments
 
LVL 27

Accepted Solution

by:
d-glitch earned 250 total points
ID: 35056097
Sure.  Starting is easy, but making it smart may be hard.

All of your short line segments are characterized by a pair of endpoints and a slope.

You can combine short line segments into longer line segments if the slopes match
to some TBD tolerance and one endpoint of each segment are close enough.
That's another TBD.

Once you 're done with the line segments, you can start looking for corners, and
then polygons.  Look for endpoints that are close enough.

Polygon extraction is one of the standard image processing algorithms.
0
 
LVL 6

Assisted Solution

by:t-max
t-max earned 250 total points
ID: 35056277
This is a hard problem and can't be easily solved. It's similar to make a program to solve captchas.
Moreover, the draw you attached is a 2D but seems to be in perspective, which makes things even harder (a square is a trapezoid, a circle turns to ellipse, etc).
If your problem isn't constrained by some pre-defined assumptions, I'm not sure you'll find an algorithm to solve this, no matter how "smart" it is.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Nadia
Suppose you use Uber application as a rider and you request a ride to go from one place to another. Your driver just arrived at the parking lot of your place. The only thing you know about the ride is the license plate number. How do you find your U…
Iteration: Iteration is repetition of a process. A student who goes to school repeats the process of going to school everyday until graduation. We go to grocery store at least once or twice a month to buy products. We repeat this process every mont…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now