imfill() causes error in padarray

1 回表示 (過去 30 日間)
Thomas Eicher
Thomas Eicher 2019 年 10 月 15 日
コメント済み: Radhi 2024 年 3 月 16 日
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?

採用された回答

Walter Roberson
Walter Roberson 2019 年 10 月 15 日
That line of code does not occur in Mathwork's padarray() in your release.
I suspect that you have a third-party padarray.m
which -all padarray
should show something in toolbox/images/images/padarray.m and something in toolbox/images/images/@gpuArray/padarray.m
  2 件のコメント
Thomas Eicher
Thomas Eicher 2019 年 10 月 16 日
You are quite correct. I'm working on a large codebase inherited from someone else and sure enough, there is a custom function called padarray that has different behavior from the current version published by Mathworks.
Radhi
Radhi 2024 年 3 月 16 日
thanks yes i got the same problem . yes third paddaray

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital Filter Analysis についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by