Loading an image using a GUI in matlab
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
currently, i am involved in a project whose purpose is to extract characters from a water meter image just like its done in OCR. I am using matlab. I have created a GUI using Guide, and i would like to load an image of a water meter into it and then process it in such a way that i extract the characters and save them in a word readable and editable form. I have used the uigetfile function but all it does is to open the directory where the images are but to get the image into a work space within the gui is problematic, please help
0 commentaires
Réponse acceptée
Jarrod Rivituso
le 25 Mar 2011
When using GUIDE, the process for this is typically as follows.
1. In a callback, use uigetfile to grab file name and then load the data.
2. Add the data to the handles structure.
>> myData = imread('...')
>> handles.myData = myData;
3. Update the GUI's version of the handles structure using guidata.
>> guidata(hObject, handles)
4. Then, in subsequent callbacks, the data can be accessed in the handles structure:
>> image(handles.myData)
More info on guidata can be found here
There are other ways as well, but this approach is very common when using GUIDE. Hope this helps!
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!