Human Face Recognition
|Edge detection of 2 different alphanumeric char & their crosscorrelation|
MATLAB Program 7
%edge detection of 2 different alphanumeric char & their crosscorrelation
I = imread('apple1.bmp');
%J = imnoise(I,'salt & pepper',0.02);
BW1 = im2bw(I,.5);
BWA=uint8(BW1);%changes logical to uint8
BWB=uint8(BW2);%changes logical to uint8
BW3 = edge(BWA,'canny');
BW4 = edge(BWB,'canny');
%p=BW1 * BW2;
Z = fspecial('gaussian');
figure, freqz2(Z,[64 64]), axis([-1 1 -1 1 0 1.4])
First of all two alphabets “A” & “F” are read in two variables I & J then two matrices are formed BW1 & BW2 . When we are working with “canny” it is unable to handle logical values so logical value is converted to uint8 format by using uint8() function.Then edge(BW1,’canny’) function forms the sharp edges of two alphabets.Here also Gaussian filter is used in order to get the desired output thus we can conclude that they are two different alphabets.
h= fspecial(type) creates a two-dimensional filter h of the specified type. fspecial returns h as a correlation kernel, which is the appropriate form to use with imfilter, “type” is a string having one of these values.
Want To Know more with
Contact for more learning: webmaster@freehost7com
The contents of this webpage are copyrighted © 2008 www.freehost7.com
All Rights Reserved.