% Image recognition


% load images
a1=imread('p1','PNG');
a2=imresize(a1,[64,64]);
a3=a2(:,:,1);
a4=reshape(a3,4096,1);



% perform recognition
Y = edgedetect(a4);
Y1 = U'*Y;
val = y'*Y1;

if val < th
    disp('it is a dog');
else
    disp('it is a cat');
end