Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: comparing two images and detecting differences

by JoshuaD (Novice)
on Jan 01, 2004 at 02:15 UTC ( [id://318068]=note: print w/replies, xml ) Need Help??


in reply to comparing two images and detecting differences

Like someone said above, image comparision is not an easy subject. You're best bet is to write it in C, and call it from perl. To pre-process the images (before you compare), you should look into color normalization. It's a simple formula actually(the image is a NxM matrix or 2d array).
foreach pixel { (pixel - min)*255/max }
If you've got RGB you'll have to do that for each of the color values. After you do that, you'll probobly wanna do edge detection using a laplachian filter. After this it gets really tricky, but learning those two things will get you pointed in the right direction.

Replies are listed 'Best First'.
Re: Re: comparing two images and detecting differences
by bean (Monk) on Jan 05, 2004 at 21:39 UTC
    I think comparing edges only may be the key (excellent link, JoshuaD). The edges should capture the features of the coins being compared. Simply comparing images will not work - here's why.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-19 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found