Re: Template Matching



androalpha_v7@xxxxxxxxx wrote in message <60ed041e-aaaa-
43b5-aa08-876e61f69f74@xxxxxxxxxxxxxxxxxxxxxxxxxxx>...
can i do the correlation if the template and original
image 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
.



Relevant Pages

  • Re: Output Pin Custom Allocator
    ... -I want the GetPointer in transform method return me a buffer using ... -And i want the downstream default video renderer to take this buffer.. ...  It is the VMR7 and the VMR7 will ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Type of memory in VMR9 allocator
    ... output buffer for transformation function from 3r party library and after ... temporary buffer to output sample. ... as a downstream filter and he provide a video memory in allocator buffers, ... It sounds to me as though you've implemented a typical "copy" transform ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Output Pin Custom Allocator
    ... -And i want the downstream default video renderer to take this buffer. ... insist on its own allocator as stated in the docs. ... -I am using my own transform filter using a CTransformFilter ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Question about the video transform filter
    ... >> I got a problem in developing a video transform filter. ... >> allocator buffer count to 2, ... >> to get the output media sample buffer, it always return the same buffer ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Icon Validation Strings
    ... you create an icon with indirected text, specify say 40 characters ... buffer size in the correct location in the template file. ... target program is running has nothing to do with TemplEd. ...
    (comp.sys.acorn.programmer)