0

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

2
Contributors
4
Replies
6
Views
8 Years
Discussion Span
Last Post by roti_john
0

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.

0

so impossible(0%) to use php search for same/similar images from database?

0

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.

Edited by diafol: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.