简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM