Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Pattern Recognition(Matlab)

Status
Not open for further replies.

Naveed Ahmed

Member level 4
Joined
Aug 31, 2008
Messages
77
Helped
9
Reputation
18
Reaction score
9
Trophy points
1,288
Location
Singapore
Activity points
1,862
Hi...

I m new in image processing...

want 2 recognize my specified pattern..

I read an image with imread command,converted it into grayscale. then i have to use normxcorr2 function..

how normxcorr2 function works?? what is template? and how it is used??


thanks


Naveed
 

Hi,

Template is the pattern you want to find in the image. For example if you are looking for circles in an image, a smaller image containing only a circle is the template. Once you calculate the cross-correlation between a template T and an image I, you obtain an image X.

The location of the pixel with the highest value in X will give you the location of the most similar pattern in I.

In the link below, it is very clearly explained how to do cross-correlation and how to calculate the coordinates of the found pattern using the information returned from the function normxcorr2.

**broken link removed**

Regards.
 

Thanks dear!


I have the following code and steps

1) I=imread('G:\test.bmp')
2) rgb=rgb2gray(I)
3) template=imcrop(rgb)
4) cc= normxcorr2(template,rgb)

Results.
1)rgb matrix is 10x10 matrix, while template matrix is 6x5 matrix.
2)cc returns me 15x14 matrix.

How can i recognize the template or my specified pattern in rgb?? How should i read this 15x14 matrix??

thanks alot

Naveed
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top