How to substitute "getimage" function?
Mostrar comentarios más antiguos
I don't have a the Image Toolbox installed in my pc in my new company and I would like to know how to substitute the getimage function for now:
function addchippicture_button_callback(hObject, eventdata, handles)
global dataStruct
[FileName,PathName] = uigetfile('*.png');
chip_image = strcat(PathName,FileName);
chip_image = imread(chip_image);
image('Parent', handles.chip_axes, 'CData', flipdim(chip_image,1));
axis(handles.chip_axes,'tight');
dataStruct.chip_image = flipdim(getimage(handles.chip_axes),1);
end
Thank you very much!
Respuesta aceptada
Más respuestas (2)
Image Analyst
el 26 de Ag. de 2013
Get the CData property. Try
h = image(......
get(h,'CData')
or maybe this is what you want
dataStruct.chip_image = flipud(chip_image);
2 comentarios
André
el 26 de Ag. de 2013
Image Analyst
el 26 de Ag. de 2013
I think you did something wrong. Show your code. Why do you want the display data anyway, instead of the actual original data? This seems to be a dangerous thing to do and I would not recommend it at all. The displayed data could be changed in ways that you are not aware of. I think you'd be better off using the original data you got from imread().
Wayne King
el 26 de Ag. de 2013
Try
get(h,'CData')
on the graphics handle.
For example:
I = imread('cameraman.tif');
h = imshow(I);
A = get(h,'CData');
isequal(I,A)
figure;
imshow(A)
2 comentarios
André
el 26 de Ag. de 2013
Walter Roberson
el 26 de Ag. de 2013
image(A) instead of imshow(A)
Categorías
Más información sobre Image Preview and Device Configuration en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!