On Feb 19, 2006, at 9:50 PM, Phil M wrote:

On Feb 19, 2006, at 6:22 PM, Mike Woodworth wrote:

if they are multiple copies of the same exact image, i'd do something like histogram matching... does loop though all the pixels and put them into x bins each r,g,b. then store the count of items in each bin. you'll end up with an array on counts. compare that to other images. it should be a perfect match if they from the same photo, but you can also set a threshold by subtracting each bin from the equivalent on the test image. take the absolute value of it and add them all together. the smaller the number, the closer the histograms are matched.

This is a very good idea and sounds like it would be able to identify identical pictures easily.

TIP:

Don't loop through every single pixel in the image as this is very time consuming for large images. Instead take advantage of the For...Next "Step" option (see OLR) for stepping over every 2 to 4 pixels. Stepping 2 pixels in both X and Y will be approximately 400% faster than every pixel, and stepping 4 pixels would be approximately 1600% faster.

well, if we're talking algorithms, thats one thing - if we talking optimizations, use the histogram function available to all osx apps via vImage framework (assuming you using mac).

mike
--
Mike Woodworth
[EMAIL PROTECTED]


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to