Original Post
Hello all,
I have a problem that is not necessarily related to game programming, but I figured that someone here might know of a good solution.
I have a system of determining the outline of 2D vector images. It is a simple system that basically slices the image into 64 sections from top to bottom, and determines the left side and right side extents of the vector image. There is an array of "left" and "right" sides with 64 elements. Element 0 is the top and element 63 is the bottom. One way to think about it is to picture fingers coming in from the left and the right hand side. The fingers bump into the image and can record the shape of the image. This works very quickly and can determine the outline of many images and even handles some concavity.
Now, here is the problem. Lets say that I have a "reference" image. I do my outline array trick and now I have 64 entries of "left" and "right" sides. Now I want to compare this image with a "test" image to see how closely the test image matches the reference image.
It would seem that this method of comparison drastically reduces the calculations needed to compare two images. Indeed, the images can be drawn in a completely different order -- the only thing that matters is the outline.
So I need a way to compare the 64 left and right entries from the reference image, and tell me how close of a match this one is to the test image. Ideally, if the test image has the same outline, I will get some round number like 0 error, or 100% match.
Any ideas of how to compare the two images this way?
The problem actually reminds me of comparing voice-print data.
Bill