Input data is finite, 2D, real and positive but iptcheckinput error

2 views (last 30 days)
Input data is finite, 2D, real and positive but iptcheckinput error in the "edgetaper" and "deconvlucy" gives the following error messages:
??? Error using ==> iptcheckinput Function EDGETAPER expected its first input, I, to be finite.
Error in ==> edgetaper>parse_inputs at 117 iptcheckinput(I,{'uint8','uint16','int16','double','single'},{'finite', ...
Error in ==> edgetaper at 35 [I, PSF, sizeI, classI, sizePSF, numNSdim] = parse_inputs(varargin{:});
I know origdata is a 2D array of real doubles between 0 and 256 as I have done the following checks in the command line
>> sum(sum(abs(imag(origdata))))
ans =
0
>> min(min(origdata))
ans =
0
>> max(max(origdata))
ans =
256
>> ndims(origdata)
ans =
2
I am struggling to see any way to deconvolute this image (I have tried the 3 different deconvolution functions but they all throw up the same errors)
In the error messages above, the error appears for edgetaper, but if I remove this and try putting my data straight into any of the deconv functions, the same errors come up.
The code that throws up the error:
I = edgetaper(origdata,gausspsf); datadeconv = deconvlucy(I,gausspsf);

Answers (1)

Walter Roberson
Walter Roberson on 1 Mar 2013
You should check
any(isnan(origdata(:)))
Remember that max() and min() ignore NaN

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!