function [F]=feature(im)
im=double(im);
m=mean(mean(im));
s=std(std(im));
F=[m s];
end

댓글 수: 2

Emenike Goodluck
Emenike Goodluck 2018년 11월 10일
Question not well understood. What is the problem you want to solve? Where do you encounter the error?
Walter Roberson
Walter Roberson 2018년 11월 10일
How are you invoking this routine ?

댓글을 달려면 로그인하십시오.

답변 (4개)

Anil Kumar
Anil Kumar 2018년 11월 11일

0 개 추천

When calling in main function then this error occurs.
madhan ravi
madhan ravi 2018년 11월 11일
편집: madhan ravi 2018년 11월 11일

0 개 추천

im = rand(1,10)
F=feature1(im) %calling of function
function F=feature1(im)
im=double(im);
m=mean(mean(im));
s=std(std(im));
F=[m s];
end

댓글 수: 5

madhan ravi
madhan ravi 2018년 11월 11일
Please note that feature is an inbuilt function of matlab so i changes it to feature1 in case to avoid shadowing.
madhan ravi
madhan ravi 2018년 11월 11일
So use imread to read Image file
madhan ravi
madhan ravi 2018년 11월 11일
I told you to change feature to feature1 did you even read my comment??
Anil Kumar
Anil Kumar 2018년 11월 11일
Thanks it works for me
madhan ravi
madhan ravi 2018년 11월 11일
편집: madhan ravi 2018년 11월 11일
Anytime :), make sure to accept the answer if it answered your question so that people know the question is solved

댓글을 달려면 로그인하십시오.

Anil Kumar
Anil Kumar 2018년 11월 11일

0 개 추천

im value is read from image file
Anil Kumar
Anil Kumar 2018년 11월 11일
편집: madhan ravi 2018년 11월 11일

0 개 추천

clc;
clear all;
close all;
[fname, path]= uigetfile('.jpg','Provide a face as input for training');
fname=strcat(path,fname);
im=imread(fname);
imshow(im);
title('Test face');
%Find out which class it belongs
which -all feature;
Ftest=feature(im);

댓글 수: 1

Anil Kumar
Anil Kumar 2018년 11월 11일
편집: madhan ravi 2018년 11월 11일
I got following error:
Error using feature
Too many input arguments.
Error in usejava (line 44)
isok = system_dependent('useJava',feature);
Error in warnfiguredialog (line 11)
if ~usejava('jvm')
Error in uigetfile (line 121)
warnfiguredialog('uigetfile')
Error in faceclassifier (line 6)
[fname, path]= uigetfile('.jpg','Provide a face as input for training');

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

태그

질문:

2018년 11월 10일

편집:

2018년 11월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by