Question

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
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top