How do I show the information of an image? I am using matlab r2018b and I cant find any working example.

1 回表示 (過去 30 日間)
Nikolo
Nikolo 2018 年 12 月 20 日
編集済み: Nikolo 2018 年 12 月 23 日
Here is the GUI and I want to show the information of the Image on the right side (Image Information Panel). This is my Code:
% Button pushed function: Enter_Image_Btn
function Enter_Image(app, event)
%pp.UIAxes.Position = [0 0 app.UIFigure.Position(3:4)];
%app.UIAxes.reset
[filename, filepath] = uigetfile({'*.*' ;'*.jpg' ; '*.png' ; '*.bmp'},'File Select');
[name, ext] = fileparts(filename);
if isnumeric(filename); return; end
image = imread(fullfile(filepath, filename));
imshow(image, 'Parent', app.UIAxes, ...
'XData',[1 app.UIAxes.Position(3)], ...
'YData',[1 app.UIAxes.Position(4)]);
image=strcat(filepath, filename);
fileinfo=imfinfo(image);
size=fileinfo.FileSize(1,1);
%app.UIAxes.XLim = [0 I.XData(2)];
%app.UIAxes.YLim = [0 I.YData(2)];
app.txtName.Value = name;
set(app.txtType.Value, 'string', ext);
set(app.txtSize.Value, 'string', size);
end
  12 件のコメント
Image Analyst
Image Analyst 2018 年 12 月 21 日
"on the right side" <--- you mean in the "LZW Results" panel? Or in the "Component Browser" panel? Or in the "Image Information" panel?
Nikolo
Nikolo 2018 年 12 月 21 日
In the "Image Information" sir. Thats where i want the name etc.. to show.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Data についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by