フィルターのクリア

Is there a fix for truesize?

2 ビュー (過去 30 日間)
Lawrence
Lawrence 2015 年 4 月 21 日
回答済み: Lawrence 2015 年 4 月 22 日
truesize stopped working a couple weeks ago in 2014b the same day I did a Java Update. Upgrading to 2015a did not fix it. This on Mac OS 10.10.2, Java 8 update 45. Here is code:
>> a = randn(256);
>> imagesc(a)
>> truesize
Undefined variable "images" or class "images.internal.initSize".
Error in truesize (line 48)
images.internal.initSize(imHandle, 1, isBorderTight);
>>
Anyone know of a fix? Or should I try to downgrade Java?

回答 (2 件)

Image Analyst
Image Analyst 2015 年 4 月 21 日
I never have gotten that to work. For example, in the following code, nothing at all happens to the displayed image when you call truesize.
grayImage = imread('concordorthophoto.png');
imshow(grayImage);
truesize
grayImage = imread('cameraman.tif');
imshow(grayImage);
truesize
I brought this up to the Mathworks team and they told me to use a scrollpanel if I wanted to show an image pixel-for-pixel. See attached demo.
  2 件のコメント
Lawrence
Lawrence 2015 年 4 月 22 日
Thank you. Unfortunately, seems like there are bigger problems with my installation. imshow is not found (despite verifying that IPT folders are on the path - and I moved them to the top of the path). And then there's this:
>> imtool(a) The class "images.internal" is undefined. Perhaps Java is not running.
Error in imtool (line 172) if ~images.internal.isFigureAvailable()
So it seems like the problem is that the Java "upgrade" does not have the images class. grr.
Image Analyst
Image Analyst 2015 年 4 月 22 日
I don't know about any of that. Since you have a version of MATLAB within a year old, you should still have tech support so call them. But before that, just try downloading R2015a. It now has imshow() built in to base MATLAB, though it should have worked with R2014b since you have the Image Processing Toolbox.

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


Lawrence
Lawrence 2015 年 4 月 22 日
Apparently it was a path issue, but I'm still not sure how the path got corrupted. Mathworks tech support had the fix though:
>> restoredefaultpath
>> rehash toolboxcache
All is well.

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by