When I try the "Fill holes in grayscale image" example directly from the imfill() documentation page, an error occurs in padarray as shown below.
I = imread('tire.tif');I2 = imfill(I);Undefined function 'mkconstarray' for input arguments of type 'char'.Error in padarray>ConstantPad (line 127)b = mkconstarray(class(a), padVal, sizeB);Error in padarray (line 80) b = ConstantPad(a, padSize, padVal, direction);Error in imfill (line 132) mask = padarray(mask, ones(1,ndims(mask)), -Inf, 'both');
I tried the two lines below with the same result.
I = single(I)I2 = imfill(I);
What is wrong?
Best Answer