cszn / IRCNN

Learning Deep CNN Denoiser Prior for Image Restoration (CVPR, 2017) (Matlab)
http://openaccess.thecvf.com/content_cvpr_2017/papers/Zhang_Learning_Deep_CNN_CVPR_2017_paper.pdf
602 stars 172 forks source link

Could you help me fix the problem #8

Closed akafen closed 6 years ago

akafen commented 6 years ago

Error using edgetaper Expected input number 2, PSF, to be nonzero.

Error in edgetaper>parse_inputs (line 128) validateattributes(PSF,{'uint8','uint16','int16','double','single'},...

Error in edgetaper (line 34) [I, PSF, sizeI, classI, sizePSF, numNSdim] = parse_inputs(varargin{:});

Error in Demo_deblur_real_application (line 76) y = edgetaper(y,k);

cszn commented 6 years ago

Check whether k is a valid kernel.

akafen commented 6 years ago

I just run the demo,but it could not work,the problem is what I said

cszn commented 6 years ago

Pay attention to "Expected input number 2, PSF, to be nonzero."

pingfansong commented 6 years ago

PSF is required not to contain zero elements by the function validateattributes(PSF,{'uint8','uint16','int16','double','single'},...

So, you need to check PSF to make sure it does not contain zeros.