필터 지우기
필터 지우기

Is there a fix for truesize?

조회 수: 1 (최근 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 CenterFile Exchange에서 Introduction 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