Hi all,
I would like to know is it possible for php do the images matching?Example, user upload the image and search from similar/ same picture?
Thanks
Do you mean filename searching? I don't think it could search for file contents. You could have a tagging (keyword) system in which case, your app could return a list of similar images.
so impossible(0%) to use php search for same/similar images from database?
php would have to search for similar colours/shapes etc. This link may give you an idea:
http://search.cpan.org/dist/Test-Image-GD/lib/Test/Image/GD.pm
But the processing power required to search, say 100+ images for similarities within the file itself may be huge. However, there seems to be a GD method in the perl GD.pm module:
use GD qw(: DEFAULT :cmp);
# get $image1 from somewhere
# get $image2 from somewhere
if ($image1->compare($image2) & GD_CMP_IMAGE) {
warn "images differ!";
The above extract was taken from http://cpansearch.perl.org/src/LDS/GD-1.20/GD.html
I don't know how you'd do this via php.
ImageMagick has some functionality:
http://www.imagemagick.org/script/compare.php
and
http://www.imagemagick.org/Usage/compare/
Hope it helps.
Thank you very much~!
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.