MATLAB Answers

0

too many input argument

Asked by Anil Kumar on 10 Nov 2018 at 20:06
Latest activity Edited by madhan ravi
on 11 Nov 2018 at 10:08
function [F]=feature(im)
im=double(im);
m=mean(mean(im));
s=std(std(im));
F=[m s];
end

  2 Comments

Question not well understood. What is the problem you want to solve? Where do you encounter the error?
How are you invoking this routine ?

Sign in to comment.

Tags

Products

4 Answers

Answer by Anil Kumar on 11 Nov 2018 at 0:01

When calling in main function then this error occurs.

  0 Comments

Sign in to comment.


Answer by madhan ravi
on 11 Nov 2018 at 0:01
Edited by madhan ravi
on 11 Nov 2018 at 0:38

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 Comments

I told you to change feature to feature1 did you even read my comment??
Thanks it works for me
Anytime :), make sure to accept the answer if it answered your question so that people know the question is solved

Sign in to comment.


Answer by Anil Kumar on 11 Nov 2018 at 8:28

im value is read from image file

  0 Comments

Sign in to comment.


Answer by Anil Kumar on 11 Nov 2018 at 8:59
Edited by madhan ravi
on 11 Nov 2018 at 9:07

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 Comment

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

Sign in to comment.