View Single Post
  #2 (permalink)  
Old 09-09-2003, 12:40 PM
Andor
Guest
 
Posts: n/a
Default Re: image in image search

Andreas wrote:
> I am trying to find an image in another one (along the lines of a house in a
> map
>
> Photographed from the air).


Hi Andreas,

long time ago, I programmed a detector for geometric objects in an
image. I think the algorithm could be adjusted for your use (sorry,
doesn't use FT or Wavlets . It is very robust against distortion,
rotation and partial overlapp. To quote the Beasty Boys: It goes a
little something like this:

1. "Learn" the object: Get a picture of the object, and define a point
(the "center") by hand on the picture. Apply an edge-detector to the
picture to find the edges of the contour of the object, and a another
filter (I forgot which one) which assigns the angle of the contour at
each point on the contour. Draw some rays (let's say twenty) radially
starting from the user-defined "center"-point until they hit the
contour (advance the angle of the next ray by 360/number-of-rays so
that you get the full circle). Store the angle of the contour at that
point. This will give you twenty angles, which already define your
object (the distance from the "center" point to the contour doesn't
matter).

2. Search: Run an edge detector over the image which you are
searching, and afterwords the angle detector (as in step 1). For each
point (pixel) in the image, draw twenty radial rays and compare the
angles you find when you hit a contour with the ray with the angles
you have stored for your object. If you have matched let's say 2/3 of
the angles, you have found the object in the picture, and you know
where it's contour is and how it is rotated.

Parameters for this algorithm are the number of rays used to define an
object and the number of matches before you declare the object found
(you can also play around with the edge-detect kernel for contour
sensitivity). It is easily fine-tuned for different applications.

I also experimented with compound objects with more than one contour
(for example a ring) which worked as well. This was about ten years
ago, most probably more sophisticated algorithms are available (this
algorithm completely ignores surface texture).

Regards,
Andor
Reply With Quote