How do I show VARIABLE image file in Matlab app designer?

5 ビュー (過去 30 日間)
Mataramasuko Abdülhakim
Mataramasuko Abdülhakim 2020 年 5 月 8 日
function testagiletahminButtonPushed(app, event)
load testag4.mat % Önceen eğitilen ağı yüklüyoruz.
[TestAdi, TestYolu] = uigetfile ('*.png','Test Resmi Seçiniz');
A=imread([TestYolu, TestAdi]);
app.Image.ImageSource=imshow(A) % ONLY THIS ONE IS FAULTY! EVERYTHING ELSE WORKS!
%IT DOESN'T ACCEPT THE CODE ABOVE! A IS THE INPUT "IMAGE" SELECTED BY
%THE USER. WHAT MUST THE CODE BE LIKE?
How do we fix this? It says:
Error using matlab.ui.control.Image/set.ImageSource (line 123)
ImageSource value must be a valid file path, or an m-by-n-by-3 color data matrix.
  1 件のコメント
Sampath Rachumallu
Sampath Rachumallu 2020 年 5 月 8 日
Try this app.Image.ImageSource=A;

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Deep Learning Toolbox についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by