MATLAB Answers

Paulo
1

inpainting_nans by John D'Errico ERROR MESSAGE

Asked by Paulo
on 20 Jul 2011
I used the inpainting_nans that is available here http://mathworks.com/matlabcentral/fileexchange/4551
I used an image file with a black background picture and a white spot on the middle of it. A = imread('F:\image.bmp');
and i used the inpainting_nans code to see what will be its effect B = inpaint_nans3(A);
But I encountered this error:
?? Error using ==> mtimes Sparse integer array arithmetic operations are not supported.
Error in ==> inpaint_nans3 at 159 rhs=-fda(:,known_list)*A(known_list);
What does this mean?

  0 Comments

Sign in to comment.

1 Answer

Answer by Titus Edelhofer on 20 Jul 2011
 Accepted Answer

Hi, you will probably have to convert the image from integer values to doubles. Try
Ad = double(A);
and run inpaint_nans with Ad ...
Titus

  2 Comments

Yes. inpaint_nans requires conversion to double. You could also just add these lines to the beginning:
if ~isa(A,'double')
A = double(A);
end
thank you very much to the both of you

Sign in to comment.