Is there a fix for truesize?

1 view (last 30 days)
Lawrence
Lawrence on 21 Apr 2015
Answered: Lawrence on 22 Apr 2015
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?

Answers (2)

Image Analyst
Image Analyst on 21 Apr 2015
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 Comments
Lawrence
Lawrence on 22 Apr 2015
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 on 22 Apr 2015
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.

Sign in to comment.


Lawrence
Lawrence on 22 Apr 2015
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.

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!