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 日間)
ahmad lemah
ahmad lemah 2017 年 3 月 31 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
%% 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