NEW
hi friends
come to see my hack @ YAHOO HACK U 09
what www.tineye.com provides:
- TinEye creates a unique and compact digital signature or 'fingerprint'
- compares this fingerprint to every other image in TinEye index to retrieve matches
- TinEye does not typically find similar images
- it finds exact matches including those that have been cropped, edited or resized
the new approach
- search from web directly
- no predefined image database
- find simillar and exactly same images
- can give statics like extent of matching(eg 10 % matching or 90 % matching)
- more robust
- not a biased search.
how i did it
- get the YQL query for trivial image search
select * from flickr.photos.search where text="tower"
- get the REST query from YQL
http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20flickr.photos.search%20where%20text%3D%22.jpg%22%20%20limit%2010&format=xml
- pars the REST query to get image url using curl,perl,grep,sed and awk
curl "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20flickr.photos.search%20where%20text%3D%22.jpg%22%20%20%0A&format=xml" 2>/dev/null | perl -pe 's,<,\n<,g' | grep '^<photo' | sed -e 's/[^"]*"\([^"]*\)"/\1 /g' | awk '{printf("http://farm%d.static.flickr.com/%d/%s_%s.jpg\n", $1, $8, $2, $7);}'
- again pars the table containing URL to wget
for url in $( curl "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20flickr.photos.search%20where%20text%3D%22.jpg%22%20%20%0A&format=xml" 2>/dev/null | perl -pe 's,<,\n<,g' | grep '^<photo' | sed -e 's/[^"]*"\([^"]*\)"/\1 /g' | awk '{printf("http://farm%d.static.flickr.com/%d/%s_%s.jpg\n", $1, $8, $2, $7);}' ); do
wget -o file2.jpg $url
done
- put in a bash scrip a.sh
#!/bin/bash
echo "...........IMAGE download........"
for url in $( curl "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20flickr.photos.search%20where%20text%3D%22.jpg%22%20%20%0A&format=xml" 2>/dev/null | perl -pe 's,<,\n<,g' | grep '^<photo' | sed -e 's/[^"]*"\([^"]*\)"/\1 /g' | awk '{printf("http://farm%d.static.flickr.com/%d/%s_%s.jpg\n", $1, $8, $2, $7);}' ); do
wget -o file2.jpg $url
done
- write another bash script to compare images
#!/bin/bash
echo "...........IMAGE SEARCH........"
./compare_image.out # executable file for image comparision
cat head256 joint_histogram.int | display & #shows relative alignment of images
cat head out3.int | display & # the two images displayed
cat head out4.int | display &
loop holes
please figure it out and report me
I am already having some of them.