views:

347

answers:

4

Is this even possible? I have one huge image, 80mb with a lot of tiny pictures. They are tilted and turned around as well. How can i search for an image with programming? I know how to use java and c++. How would you go about this?

+4  A: 

You might want to look up the Scale Invariant Feature Transform (SIFT) algorithm. Just for example, it's used in a fair number of programs for automatically generating panoramas, to recognize the parts of pictures that match up, despite differences in scaling, tilting, panning, and so on.

Edit: Quite true -- it is patented, and I probably should have mentioned that to start with. In case anybody care's it's US patent # 6,711,293.

Jerry Coffin
There is a big gotcha with SIFT, namely that its got a patent and can only be used for research purposes.
ldog
+2  A: 

How much do you know about the image? Exactly what it looks like? Do you have a copy of the image and you just need to figure out where in the large image it is?

Anyway, the branch of CS that deals with these kinds of questions is called Computer Vision.

Open CV and TINA are two open source libraries you might be able to use.

Chad Okere
+1  A: 

You should probably start out with the simplest ideas and see if they are sufficient for your needs. In the field of pattern matching the simplest idea is that of template matching. There is an efficient implementation of template matching found in OpenCv.

Note that template matching is rotation variant, meaning if the template you are trying to match can be rotated in the image you are trying to find it in, it won't work unless you pre-rotate the templates.

ldog
+1 for suggesting OpenCV. But template matching is going to be very slow if the images can be rotated and tilted.
nikie
Yes it can be slow, but SIFT is by no means a fast algorithm itself. There are several improvements on template matching that claim to get better results than SIFT, take for example one researchers ideas: http://www.lps.usp.br/~hae/software/cirateg/index.html
ldog
+3  A: 

One algorithm I've used before is SIFT. If you're interested in implementing the algorithm for yourself, you can see course notes for CPSC 425 at UBC, which describes in gentle detail how to implement SIFT in MATLAB. If you just want code that does this, take a look at VLFeat, a C library that does SIFT and a number of other algorithms.


Quotation from Jerry Coffin:

Edit: Quite true -- it is patented, and I probably should have mentioned that to start with. In case anybody care's it's US patent # 6,711,293.

Wesley
I took that course actually, the notes do not describe in detail how to implement SIFT. Also, if you are new to image processing implementing SIFT off the bat is quite a hopeless task.
ldog
In retrospect, you're right: SIFT was certainly not trivial to implement. Hopefully VLFeat (or sift++ or pysift or the like) will help though.
Wesley