From: Malcolm on
Hi - I have some code that scans individual bitmaps from an avi file and matches three points on each image using xcorr2. I would like to be able to specify a subregion of the image for template matching based on the location of the previous match in order to speed things up a bit. Does anyone know if this is possible and if so, which function I need to use? The only thing I've spotted so far is ROIPOLY but that seems to be related to specifying the mask area.

Any help very gratefully received !

Malcolm

From: Malcolm on
"Malcolm " <m.rae(a)uea.ac.uk> wrote in message <hod9qm$nv0$1(a)fred.mathworks.com>...
> Hi - I have some code that scans individual bitmaps from an avi file and matches three points on each image using xcorr2. I would like to be able to specify a subregion of the image for template matching based on the location of the previous match in order to speed things up a bit. Does anyone know if this is possible and if so, which function I need to use? The only thing I've spotted so far is ROIPOLY but that seems to be related to specifying the mask area.
>
> Any help very gratefully received !
>
> Malcolm
>

Not sure if I've just not explained this very well or if it's just not possible. My understanding is that xcorr2 effectively places the template at the top left corner of the input matrix (image) and then matches template to matrix in a top to bottom order. Based on the location of a match I would like to be able to specify the start and end point of this search pattern in order to improve performance. If this is not possible does anyone know of a more efficient way of performing this function ?

Cheers - Malcolm
From: ImageAnalyst on
Malcolm
You'll have to crop out the subimage you want to cross correlate based
on the bounding box of the region.