Re: Template Matching
- From: "Dave Robinson" <dave.robinson@xxxxxxxxxxxxx>
- Date: Fri, 4 Apr 2008 08:46:02 +0000 (UTC)
androalpha_v7@xxxxxxxxx wrote in message <60ed041e-aaaa-
43b5-aa08-876e61f69f74@xxxxxxxxxxxxxxxxxxxxxxxxxxx>...
can i do the correlation if the template and originalimage is in
different size?
Yes, using the scanning method outlined by one of the
previous helpers (or a method that hides the image
buffering from you).
The Fast Fourier transform has the property of generating a
complex array with the same number of elements as the image
has pixels. You need to multiply two Transforms
together 'pixel by pixel' - it therefore follows that the
number of elements in your search image transform must be
the same as the number of elements in your template
transform array. Clearly there is an apparent problem
between these two observations when the template is a
different size to your search image. However this is
trivially dealt with by creating an empty buffer whose size
is the same as the search image (or bigger - see my earlier
comments) using something like 'zeros(y,x)' then simply
copy your template image into the top left hand corner of
the blank buffer, then proceed as suggested.
Hope that helps
Dave Robinson
.
- References:
- Re: Template Matching
- From: androalpha_v7
- Re: Template Matching
- Prev by Date: Re: How to count the number of ≠ element in a matrix ?
- Next by Date: GUI imshow and Slider
- Previous by thread: Re: Template Matching
- Next by thread: Re: Template Matching
- Index(es):
Relevant Pages
|