in reply to Re: Interesting problem fitting points to a template (algorithm?)
in thread Interesting problem fitting points to a template (algorithm?)

Sorry to take so long to reply, I was working through the code and thinking about implementation. Nifty idea, but not I do not believe practical for my situation. I have 7 ROIs, each could contain as many as 10 points, and of those ten the true point may or may not exist. So coming up with all of the possible combinations/permutations could make this solution prohibitive.

I have been thinking about filtering by point instead of collection (at least initially). For good registration, I need at least 4 points. Knowing the distance between the points I can work through each of the points and check the distance between each of the other points. If I set some tolerance, then I can discriminate the points that are not within the tolereance for at least 4 of the 6 distances. This should be fairly quick { 6 distances per point max ~ 10 points per ROI => 420 checks, and if I splice the array for the ROI then this number should decrease as bad points are thrown out. }


If I can run a few tests then I will see what we typically have left. If it is only 1-3 points per ROI then your solution is much more viable.


Quick question (I have not looked for this yet, thought of it while writting), do you or does anyone know of a good module for doing the permutations I need? i.e. N arrays with M elements, creating new unique arrays containing only 1 element from each of the N arrays? I am sure that it is out there, I will look for it tonight.

Thanks for you help,


Cameron
  • Comment on Re^2: Interesting problem fitting points to a template (algorithm?)

Replies are listed 'Best First'.
Re^3: Interesting problem fitting points to a template (algorithm?)
by BrowserUk (Patriarch) on Oct 06, 2004 at 21:58 UTC
    ...does anyone know of a good module for doing the permutations...

    Algorithm::Permute and NextPermute() from tye's Algorithm::Loops module are both very good implementations.

    I think that the idea of generating a signature could be made to work well for your application. I saw the extra information that you posted in reply to tachyon and I think I see the problems your describing, and also some of a possible solution. The key to taking the thoughts further is having some test data to work with. If you felt like placing some on your doowah2004's scratchpad, and /msg'ing me, I enjoy playing with it.

    That said, I'm still not entirely sure that I understand the full scope of the problem, so maybe I should just accept your more informed judgement on the matter :)


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon