MATLAB Answers

inpainting_nans by John D'Errico ERROR MESSAGE

6 views (last 30 days)
Paulo
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.

Accepted Answer

Titus Edelhofer
Titus Edelhofer on 20 Jul 2011
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

Sean de Wolski
Sean de Wolski on 20 Jul 2011
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
Paulo
Paulo on 21 Jul 2011
thank you very much to the both of you

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by