Loading an image using a GUI in matlab
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
Jarrod Rivituso
el 25 de Mzo. de 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 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!