How to save the image in axes in the GUI?
Mostrar comentarios más antiguos
Hi, I have a GUI in which i need to save the image that is in the right hand side of the axes. I here by attach you the snapshot of the GUI. This is the coding for the GUI.
I couldn't find the callback function for the image in the axes. Can you please help me to figure out saving the image that is in right hand side only. Thanks...
1 comentario
Manoj Kumar
el 25 de Jul. de 2014
Respuestas (2)
Image Analyst
el 21 de Jul. de 2014
0 votos
You put it in the axes so you should have it and can use imwrite on it. If you really want just what's in the axes rather than the original image, then use getframe().
8 comentarios
Manoj Kumar
el 21 de Jul. de 2014
Image Analyst
el 21 de Jul. de 2014
What happened to your friend?
Manoj Kumar
el 21 de Jul. de 2014
Image Analyst
el 22 de Jul. de 2014
He was using imagesc() to display them, and the second image was called im. So just do
imwrite(im, fullFileName);
Manoj Kumar
el 22 de Jul. de 2014
Editada: Manoj Kumar
el 22 de Jul. de 2014
Image Analyst
el 25 de Jul. de 2014
When you say
threshimage=image(back);
threshimage is not an image. It's the handle to an image, in other words, a floating point number, not an actual image. Just look up the help for image() function and you'll see I'm right. But then you use it as an image afterwards which is not correct.
What is the image that is in red? I can't tell because the code is hard to follow. Is it back? Is it norm_im? Whatever it is, you have it as a variable in your program and you don't need to pull it out of the axes with getframe().
Manoj Kumar
el 27 de Jul. de 2014
Editada: Manoj Kumar
el 30 de Jul. de 2014
Manoj Kumar
el 30 de Jul. de 2014
guo shaobo
el 14 de Ag. de 2014
0 votos
maybe you could solve this problem by using the following codes:
>>frame = get(get(handles.cameraAxes,'children'),'cdata');% The current displayed frame
>>save('testframe.jpg', 'frame');
cameraAxes is your axes tag in the GUI which display the image
Categorías
Más información sobre Image Arithmetic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
