Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: comparing two images and detecting differences

by zentara (Archbishop)
on Jan 01, 2004 at 20:29 UTC ( [id://318159]=note: print w/replies, xml ) Need Help??


in reply to comparing two images and detecting differences

I was going thru the Imager docs today, and came across this:

I guess the hard part would be aligning the images. But maybe you could do a series of resize and rotations and check for minimum difference?

From perldoc Imager::Filters

Image Difference You can create a new image that is the difference between 2 other images. my $diff = $img->difference(other=>$other_img); For each pixel in $img that is different to the pixel in $other_img, the pixel from $other_img is given, otherwise the pixel is transparent black. This can be used for debugging image differences ("Where are t +hey different?"), and for optimizing animated GIFs. Note that $img and $other_img must have the same + number of channels. The width and heigh of $diff will be the minimu +m of each of the width and height of $img and $other_img.

Log In?
Username:
Password:

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

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

    No recent polls found