Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

please how can i call these function to extract and display the images when i run the script i get an error like this (Error using LBPFeature Too many output arguments.)

조회 수: 1 (최근 30일)
%% Extract and display Local binary pattern Features for single face
person = 5;
[Featureex, visualization]= LBPFeature(read(training(person),1)); figure;
subplot(2,1,1);imshow(read(training(person),1));title('Input Face');
subplot(2,1,2);plot(visualization);title('LBP Feature');
_ this is the function for extraction the features_
function [LBP]= LBPFeature(I2)
I3=I2;
m=size(I2,1);
n=size(I2,2);
for i=2:m-1
for j=2:n-1
c=I2(i,j);
I3(i-1,j-1)=I2(i-1,j-1)>c;
I3(i-1,j)=I2(i-1,j)>c;
I3(i-1,j+1)=I2(i-1,j+1)>c;
I3(i,j+1)=I2(i,j+1)>c;
I3(i+1,j+1)=I2(i+1,j+1)>c;
I3(i+1,j)=I2(i+1,j)>c;
I3(i+1,j-1)=I2(i+1,j-1)>c;
I3(i,j-1)=I2(i,j-1)>c;
LBP (i,j) =I3(i-1,j-1)*2^7+I3(i-1,j)*2^6+I3(i-1,j+1)*2^5+ ...
I3(i,j+1)*2^4+I3(i+1,j+1)*2^3+I3(i+1,j)*2^2+ ...
I3(i+1,j-1)*2^1+I3(i,j-1)*2^0;
end
end

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by