How to save the image in axes in the GUI?
이전 댓글 표시
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...
답변 (2개)
Image Analyst
2014년 7월 21일
0 개 추천
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
Manoj Kumar
2014년 7월 21일
Image Analyst
2014년 7월 21일
What happened to your friend?
Manoj Kumar
2014년 7월 21일
Image Analyst
2014년 7월 22일
He was using imagesc() to display them, and the second image was called im. So just do
imwrite(im, fullFileName);
Manoj Kumar
2014년 7월 22일
편집: Manoj Kumar
2014년 7월 22일
Image Analyst
2014년 7월 25일
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
2014년 7월 27일
편집: Manoj Kumar
2014년 7월 30일
Manoj Kumar
2014년 7월 30일
guo shaobo
2014년 8월 14일
0 개 추천
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
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
