MATLAB: Get an image from a fgure window

imageImage Processing Toolboxviscircles

Hi
I have an image which has a lot of circles. So I have used imfindcirles and viscircles to find and visualize the circles in a figure window. Now I want to get the image as it is and store it in a variable in the program.
I tried using getimage, but it gets only the original image, without the circles marked in it.

Best Answer

Did you try to get cdata?
theFrame = get(gca, 'CData');
If that doesn't work, use export_fig.