フィルターのクリア

GUI

2 ビュー (過去 30 日間)
Shree Nath
Shree Nath 2012 年 6 月 5 日
I have to get an image address through the Edit Box in the GUI. then, i want to read the image on that address using the imread function. how to do it?
Address is of the form C:\Users\user\Documents\MATLAB\xyz.png

採用された回答

Image Analyst
Image Analyst 2012 年 6 月 5 日
Why not use uigetfile() instead - it's much friendlier to the user than having to type in some filename that they can't even see or easily verify that it exists.
  1 件のコメント
Shree Nath
Shree Nath 2012 年 6 月 5 日
exactly wat i wanted .. thank you :)

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

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 6 月 5 日
filename = get(handles.EDITBOXTAG, 'String'); %adjust EDITBOXTAG as needed
theimage = imread(filename);
  2 件のコメント
Shree Nath
Shree Nath 2012 年 6 月 5 日
had tried it already..
it said -
??? Conversion to logical from cell is not
possible.
Walter Roberson
Walter Roberson 2012 年 6 月 5 日
theimage = imread(filename{1});

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

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by