How extract data from image saved in fig format?

I saved my images as fig in matlab. How extract it's data now? I use gcf(get, but I can not find it,d date(maybe Cdata). what I have in variable editor are:
axesObjs.Alphamap, axesObjs.BeingDeleted, axesObjs.BusyAction, axesObjs.ButtonDownFcn, axesObjs.Children, axesObjs.Clipping, axesObjs.CloseRequestFcn, axesObjs.Color, axesObjs.Colormap, axesObjs.CreateFcn, axesObjs.CurrentAxes, axesObjs.CurrentCharacter, axesObjs.CurrentObject, axesObjs.CurrentPoint, axesObjs.DeleteFcn, axesObjs.DockControls, axesObjs.DoubleBuffer, axesObjs.FileName, axesObjs.FixedColors, axesObjs.HandleVisibility, axesObjs.HitTest, axesObjs.IntegerHandle, axesObjs.Interruptible, axesObjs.InvertHardcopy, axesObjs.KeyPressFcn, axesObjs.KeyReleaseFcn, axesObjs.MenuBar, axesObjs.MinColormap, axesObjs.Name, axesObjs.NextPlot, axesObjs.NumberTitle, axesObjs.PaperOrientation, axesObjs.PaperPosition, axesObjs.PaperPositionMode, axesObjs.PaperSize, axesObjs.PaperType, axesObjs.PaperUnits, axesObjs.Parent, axesObjs.Pointer, axesObjs.PointerShapeCData, axesObjs.PointerShapeHotSpot, axesObjs.Position, axesObjs.Renderer, axesObjs.RendererMode, axesObjs.Resize, axesObjs.ResizeFcn, axesObjs.Selected, axesObjs.SelectionHighlight, axesObjs.SelectionType, axesObjs.Tag, axesObjs.ToolBar, axesObjs.Type, axesObjs.UIContextMenu, axesObjs.Units, axesObjs.UserData, axesObjs.Visible, axesObjs.WindowButtonDownFcn, axesObjs.WindowButtonMotionFcn, axesObjs.WindowButtonUpFcn, axesObjs.WindowKeyPressFcn, axesObjs.WindowKeyReleaseFcn, axesObjs.WindowScrollWheelFcn, axesObjs.WindowStyle, axesObjs.WVisual, axesObjs.WVisualMode

 Accepted Answer

fig = openfig('FigFileName.fig', 'new', 'invisible');
imgs = findobj(fig, '-type', 'image');
thiscmap = get(fig, 'colormap');
for K = 1 : length(imgs)
thisimg = get(imgs(K), 'CData');
%now do something with it for illustration purposes
thisfilename = sprintf('extracted_image_%03d.jpg', K);
imwrite(thisimg, thiscmap, thisfilename);
end

Categories

Find more on Convert Image Type 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!