I like this solution because it is simple and clever, but the three problems that I see (and I may be wrong) are as follows:

1. I have seven vertices making up a 2d shape, this shape may have suffered rotational and translational displacement. I have a rough idea of the maximum displayment, so I look at a given size ROI around where the points would be with no displacement. After discriminating the noise for size of points I am usually left with 1-2 possible points (not bad), but I have seen as many as twelve. So looking at a worse case (but very possible), if I am left with 10 points in each ROI, then starting with one ROI and working through each set of points I have 10^7 possible geometric objects that roughly look like my template. lots of checks....

2. The distance between the points in the ROI << then the distance to the calculated centroid, so I am concerned about the ability to consistantly choose the seven correct points and not seven almost true points (similar to what you were saying about infinite number of shapes containg the same centroid). In your example it only looks at rotational displacement, there will be translation displacement, but that is easily delt with looking at the relative distances from the points to the centroid....so still valid.

3. What if the ROI contains points, but does not contain the True point?


This does give me some thoughts that I will work through. I am going to take all of the suggestions, try to hash something out in the next couple of days, and repost what I have done.

Cameron

In reply to Re^2: Interesting problem fitting points to a template (algorithm?) by doowah2004
in thread Interesting problem fitting points to a template (algorithm?) by doowah2004

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.