Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: comparing two images and detecting differences

by biosysadmin (Deacon)
on Jan 01, 2004 at 09:46 UTC ( [id://318094]=note: print w/replies, xml ) Need Help??


in reply to Re: comparing two images and detecting differences
in thread comparing two images and detecting differences

This is definitely a cool problem, here's a possible snag that you may run in to:

"My selected strategy is to reduce each image to a 4-by-4 grid of RGB values, yielding a 48-number vector of values from 0 to 255."


Assuming that the counterfeits would at least have similar color schemes to the originals, this has a very good chance of generating a lot of falsely positive matches. You could get around this by increasing the size of the grid (and therefore the length of your vectors), but this is the kind of algorithm in which C/C++ would probably outperform Perl (although you could check out the pdl). Even after making your vectors then you're left with the task of determining a metric for measuring similarity of vectors and deciding how similar two vectors must be in order to assume that they point to the same type of coin.

Here's what I think that I would do:

- Play with generating vectors using the method from Merlyn's article until you find an acceptable balance of speed and sensitivity.
- Use a measure of similarity between vectors (such as Euclidean distance) and compare different images of the same coin.
- Attempt to determine a reasonable threshold for assuming that they point to a counterfeit copy of the same type of coin.


Actually, more realistically I'd put this off until after vacation, when I could go back and ask an imaging scientist friend about the problem. :)

Good luck, and have fun.
  • Comment on Re: Re: comparing two images and detecting differences

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://318094]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found