How to get image data from an axes

3 views (last 30 days)
Jason
Jason on 3 Jun 2014
Commented: Jason on 3 Jun 2014
Hello.
I want to get the data from an image displayed on an axes using GUIDE. I have searched this forum and found that using the following should work
IM=get(handles.axes1, 'CData');
However i get the following error
Error using hg.axes/get
The name 'CData' is not an accessible property for an instance of class 'axes'.
Error in SingleImageSNR>pushbuttonCentre_Callback (line 1846)
IM=get(handles.axes1, 'CData');

Accepted Answer

Image Analyst
Image Analyst on 3 Jun 2014
Try getframe()
  1 Comment
Jason
Jason on 3 Jun 2014
Thabnkyou. I've also discovered this works:
IM=getimage(handles.axes1);

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!