Error using images.int​ernal.imag​eDisplayPa​rsePVPairs in Matlab

27 ビュー (過去 30 日間)
Majid Alaeinia
Majid Alaeinia 2019 年 3 月 22 日
コメント済み: Majid Alaeinia 2019 年 3 月 23 日
I am trying to run this code in order to warp an image, but I can not run that properly on Matlab R2018b and get the following error:
>> captureWarpPoints('man11.jpg');
Error using images.internal.imageDisplayParsePVPairs (line 71)
The parameter, notruesize, is not recognized by imageDisplayParsePVPairs
Error in images.internal.imageDisplayParseInputs (line 69)
[common_args,specific_args] = images.internal.imageDisplayParsePVPairs(varargin{:});
Error in imshow (line 245)
images.internal.imageDisplayParseInputs({'Parent','Border','Reduce'},preparsed_varargin{:});
Error in captureWarpPoints>updateRef (line 133)
refImgHandle = imshow(modRefImage, 'notruesize');
Error in captureWarpPoints (line 29)
updateRef(1, refImage, refPoints)
Note: I have Image Processing Toolkit installed.
How can I run this code properly?

採用された回答

Walter Roberson
Walter Roberson 2019 年 3 月 23 日
The code uses an old parameter for imshow() that was removed a number of years ago. The line 133 needs to be changed to
refImgHandle = imshow(modRefImage, 'InitialMagnification', 'fit');
  1 件のコメント
Majid Alaeinia
Majid Alaeinia 2019 年 3 月 23 日
Thank you. Actually these lines must change in order to run the code properly:
Line 17 in the **captureWarpPoints.m** must change to:
iptsetpref('ImshowBorder', 'tight'); % 'iptsetpref' must be lowercase not uppercase
Line 36 in the **captureWarpPoints.m** must change to:
capImgHandle = imshow(capImage, 'InitialMagnification', 'fit');
Line 133 in the **captureWarpPoints.m** as you wrote must change to:
refImgHandle = imshow(modRefImage, 'InitialMagnification', 'fit');
Line 26 in the **warpImage.m** must change to:
displaceX = griddata(x, y, zx, xi', yi);
Line 27 in the **warpImage.m** must change to:
displaceY = griddata(x, y, zy, xi', yi);

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by