too many input argument

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');

サインインしてコメントする。

カテゴリ

製品

タグ

質問済み:

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