I am working on face recognition project using lbp algorithm.I wrote a code of lbp algorithm and found the histogram of picture but I don't know what i can do to classifier between the unknown picture and my database pic how can i find classifier?

%this is the code for finding only 1 image lbp :
%input the image and find the lbp of it
z=imread('tr1.jpg'); %the input image
x=rgb2gray(z); %casting [s1 s2]=size(x); %find the size to compute the lbp y=x;
imshow(y) figure for i=2:s1-1 for j=2:s2-1 val7=(x(i,j)<=x(i-1,j-1)) ; val6=(x(i,j)<=x(i-1,j)); val5=(x(i,j)<=x(i-1,j+1)); val4=(x(i,j)<=x(i,j+1)); val3=(x(i,j)<=x(i+1,j+1)); val2=(x(i,j)<=x(i+1,j)); val1=(x(i,j)<=x(i+1,j-1)); val0=(x(i,j)<=x(i,j-1)); y(i,j)=val0*2^0+val1*2^1+val2*2^2+val3*2^3+val4*2^4+val5*2^5+val6*2^6+val7*2^7;
end
end
imshow(y)
figure
[very verx]=imhist(y);
very=very/(s1*s2);
bar(verx,very);

Risposte (0)

Richiesto:

il 10 Feb 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by