GUI
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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 个)
Walter Roberson
2012-6-5
filename = get(handles.EDITBOXTAG, 'String'); %adjust EDITBOXTAG as needed
theimage = imread(filename);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!