How can I use view a montage using Image Viewer App through imtool()?

조회 수: 3 (최근 30일)
Ogenna Esimai
Ogenna Esimai 2022년 8월 15일
답변: DGM 2022년 8월 16일
I tried to view a montage of two images in the Image Viewer App using imtool(). Montage showed okay in the MATLAB Output pane. However, no separate window opened up for the the Image Viewer App as expected. In addition, MATLAB returned error messages.
Original code:
% view montage using imtool()
imtool(montage({"x.png","y.jpg"}));
Other code I tried:
% view montage using imtool() in two steps
m = montage({"x.png","y.jpg"});
imtool(m)
Output for both code scenarios:
Expected input number 1, I, to be one of these types:
double, single, uint8, uint16, uint32, uint64, int8, int16, int32, int64, logical
Instead its type was matlab.graphics.primitive.Image.
validateattributes(common_args.CData, {'numeric','logical'},...
common_args = images.internal.imageDisplayValidateParams(common_args);
Error in imtool (line 280)
addImageToImtool(varargin{:});
Also tried:
Looking through documentation for imageDisplayValidateParams but got back message -
Undocumented Function
There is no documentation for imageDisplayValidateParams.
Tried:
Searching through this forum for a similar situation but was not able to find one.
Thank you.

채택된 답변

DGM
DGM 2022년 8월 16일
You should be able to use imtile() instead of montage() with the same syntax in this particular case. The output of montage() is a graphics object, not an image array. IPT imtile() uses similar syntax, but outputs an array instead of behaving as a viewing tool like montage.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Explore and Edit Images with Image Viewer App에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by