문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top