FPGA Groups

FPGA Groups (http://www.fpgacentral.com/group/index.php)
-   DSP (http://www.fpgacentral.com/group/forumdisplay.php?f=16)
-   -   Re: image in image search (http://www.fpgacentral.com/group/showthread.php?t=72203)

Andreas 09-08-2003 04:16 PM

Re: image in image search
 
First of all, thanks for the answers!



I am trying to find an image in another one (along the lines of a house in a
map

Photographed from the air). Scaling shouldnt be too big a problem, as both
images

Will be very similar in resolution.

So - I am trying to find a position in the larger image, where the smaller
is with

A high probability.



Still, I thought a transformation would make the search more robust against
scaling

And/or rotation errors, as well as colour shifts (in comparison to a simple
colour

Value comparision). Is that true?



Sorry, I dont really know a lot about wavelets/FT.

Best regards,

Andreas



Andor 09-09-2003 12:40 PM

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


All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved