[Ilugc] php MagickWand
rajasuperman at gmail.com
Thu Mar 26 18:42:10 IST 2009
On Thu, Mar 26, 2009 at 4:50 PM, Shahrukh Khan <shahrukh1514 at gmail.com> wrote:
> Please tell me how to compare images using this function so that if both
> images are the same then an error message can be displayed otherwise the
> image should be stored in the database.
Comparing images is not so easy. I could take a JPG image and save it
in PNG format. The images are the same to a human observer, but the
bit patterns on disk are totally different.
Further, I can take an image and change contrast, brightness, color,
move, crop, scale, sharpen, blurr, etc and humans will still say the
images are same.
Getting a computer to do this is not so easy. And there's no magic
strcmp like command which can tell you with absolute confidence if
two images "are the same".
Try reading www.imagemagick.org/Usage/compare/ and understand
what the compare command does to your data set. Try it with different
photos and understand how the different comparison algorithms work.
After you do this, you can then think of coding it in php.
> I have the codings of storing images
> in database but to implement it i need to know the output of the image
> compare function.
Repeatedly pleading for help with your project is not a good way to
complete your project. At this rate, it looks like most your assignment
is done by the luggies! Suggest you approach your project mentor
(you have one don't you?) for advice.
More information about the ilugc