From: Gül Begüm Semis on
hi,
i m just trying to write a simple code, such that matlab is going to look at the correlation between two images. there are 3 different types of images (square,circle and triangle) depending on the templates by correlation i need the result whether it s a circle,square or triangle.
i just need matlab to tell me that the target image is most correlated with one of the three templates i ve prepared.

thank you,
From: ImageAnalyst on
On Jan 13, 10:34 am, "Gül Begüm Semis" <begumse...(a)gmail.com> wrote:
> hi,
> i m just trying to write a simple code, such that matlab is going to look at the correlation between two images. there are 3 different types of images (square,circle and triangle) depending on the templates by correlation i need the result whether it s a circle,square or triangle.
> i just need matlab to tell me that the target image is most correlated with one of the three templates i ve prepared.
>
> thank you,

-----------------------------------------------------------------------------------
OK. We'll alert the media*.
You'll probably be using xcorr2().



* http://www.imdb.com/title/tt0082031/quotes
From: Gül Begüm Semis on
when i use xcorr2() the error i obtain is the following:

a=imread('ucgen.jpg');
>> b=imread('targetucgen.jpg');
>> xcorr2(a,b)
??? Error using ==> rot90 at 22
A must be a 2-D matrix.

Error in ==> xcorr2 at 17
c = conv2(a, rot90(conj(b),2));
From: Gül Begüm Semis on
when i use xcorr2() the error i obtain is the following;

a=imread('ucgen.jpg');
>> b=imread('targetucgen.jpg');
>> xcorr2(a,b)
??? Error using ==> rot90 at 22
A must be a 2-D matrix.

Error in ==> xcorr2 at 17
c = conv2(a, rot90(conj(b),2));



ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <5c1f4e50-703d-4399-986e-84a8ede29f13(a)h9g2000yqa.googlegroups.com>...
> On Jan 13, 10:34 am, "Gül Begüm Semis" <begumse...(a)gmail.com> wrote:
> > hi,
> > i m just trying to write a simple code, such that matlab is going to look at the correlation between two images. there are 3 different types of images (square,circle and triangle) depending on the templates by correlation i need the result whether it s a circle,square or triangle.
> > i just need matlab to tell me that the target image is most correlated with one of the three templates i ve prepared.
> >
> > thank you,
>
> -----------------------------------------------------------------------------------
> OK. We'll alert the media*.
> You'll probably be using xcorr2().
>
>
>
> * http://www.imdb.com/title/tt0082031/quotes
From: Dave Robinson on
"Gül Begüm Semis" <begumsemis(a)gmail.com> wrote in message <hiktph$11c$1(a)fred.mathworks.com>...
> when i use xcorr2() the error i obtain is the following;
>
> a=imread('ucgen.jpg');
> >> b=imread('targetucgen.jpg');
> >> xcorr2(a,b)
> ??? Error using ==> rot90 at 22
> A must be a 2-D matrix.
>
> Error in ==> xcorr2 at 17
> c = conv2(a, rot90(conj(b),2));
>
>
>
> ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <5c1f4e50-703d-4399-986e-84a8ede29f13(a)h9g2000yqa.googlegroups.com>...
> > On Jan 13, 10:34 am, "Gül Begüm Semis" <begumse...(a)gmail.com> wrote:
> > > hi,
> > > i m just trying to write a simple code, such that matlab is going to look at the correlation between two images. there are 3 different types of images (square,circle and triangle) depending on the templates by correlation i need the result whether it s a circle,square or triangle.
> > > i just need matlab to tell me that the target image is most correlated with one of the three templates i ve prepared.
> > >
> > > thank you,
> >
> > -----------------------------------------------------------------------------------
> > OK. We'll alert the media*.
> > You'll probably be using xcorr2().
> >
> >
> >

Are your images greysale or are they RGB if the latter check out RGB2Gray()

perhaps you can put them up onto a site where we can view them

Regards

Dave Robinson
> > * http://www.imdb.com/title/tt0082031/quotes