Given a set of coordinates, I've drawn a circular ROI onto an image that I'd like to extract:
imagesc(resized_img); hold on
scatter(X, Y, 'k', 'filled')
h = images.roi.Circle(gca,'Center',[X Y],'Radius',r);
Is there a way to extract the ROI drawn and save it as a jpeg or something similar, without a background?
I also have to do this over thousands of coordinates - my initial plan was to loop over each coordinate pair and extract and save during each iteration. Is there a more efficient way of doing this?