How to save the image in axes in the GUI?
Mostra commenti meno recenti
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...
Risposte (2)
Image Analyst
il 21 Lug 2014
0 voti
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 Commenti
Manoj Kumar
il 21 Lug 2014
Image Analyst
il 21 Lug 2014
What happened to your friend?
Manoj Kumar
il 21 Lug 2014
Image Analyst
il 22 Lug 2014
He was using imagesc() to display them, and the second image was called im. So just do
imwrite(im, fullFileName);
Manoj Kumar
il 22 Lug 2014
Modificato: Manoj Kumar
il 22 Lug 2014
Image Analyst
il 25 Lug 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
il 27 Lug 2014
Modificato: Manoj Kumar
il 30 Lug 2014
Manoj Kumar
il 30 Lug 2014
guo shaobo
il 14 Ago 2014
0 voti
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
Categorie
Scopri di più su Image Arithmetic in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
