prash2
prash2

Reputation: 25

Not enough input arguments error

Error at line2.Error is not enough input arguments.Variable original is a image file.I stored it in current folder path.Why it is showing error?

 function blur = blurMetric(original)
 I = double(original);
 [y x] = size(I);

 Hv = [1 1 1 1 1 1 1 1 1]/9;
 Hh = Hv';
 ....
 ....
 ....
 end

Upvotes: 0

Views: 1295

Answers (1)

nkjt
nkjt

Reputation: 7817

MATLAB double will not work if original is a file name (regardless of whether it is on the path or not). Also if you're have the right toolbox check out im2double.

Either from the command line:

original = imread(filename);
blur = blurMatrix(original);

Or put the file read into the function itself.

Upvotes: 1

Related Questions