View Single Post
  #5   Spotlight this post!  
Unread 20-01-2012, 18:48
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Quadrilateral of Best Fit

One of the things you might attempt is to visit the vertices and connect lines that almost touch and are almost the same slope. This will eliminate collinear line segments.

Years ago I implemented some decimation routines for a pen plotter. The algorithm involved looking at a progression of points and determining if they were within an error cone that extended from the first point. The purpose was to only transmit the points needed to draw the shape and leave out the points that barely wiggled the pen or were just segments of a straight line.

To find a corner, a similar routine could identify points roughly shared between two segments where the angle is between say 60 and 120 degrees.

Finally, while this will help to eliminate collinear points, you will then want to determine if it is a quadrilateral. Sounds like a fun challenge.

Greg McKaskle