Borrar filtros
Borrar filtros

Loading an image using a GUI in matlab

4 visualizaciones (últimos 30 días)
sichangi
sichangi el 25 de Mzo. de 2011
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

Respuesta aceptada

Jarrod Rivituso
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!

Más respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by