I want to reuse ROI selected by imellipse from an image

4 views (last 30 days)
I have an image with various ROI selected using imellipse. I do some color processing within those ROI, and output a new image. I want to select the ROI only once throughout the lifetime of an image. In other words, keep the exact same ROI, but change some parameters and output another image at later date (or perhaps let another user do the same analysis with different parameter, but same ROI).
How can I store / reproduce / redraw the ellipse ROIs resulting from imellipse? The only thing I can think of is to store result of createMask as another image. Is there another way to do this? My images are large, and ideally I don't want to store the whole image mask. All my ROIs combined... end up being less than 10-11% of the original image. Storing 90% of the non-interesting ROI data seems like a waste.
Any ideas?

Answers (1)

Image Analyst
Image Analyst on 31 Dec 2013
With code like this:
userPrompt = sprintf(' Click and drag out an ellipse.\nDouble click inside of it to accept it.');
uiwait(msgbox(userPrompt));
hEllipse = imellipse(gca); % Second argument defines ellipse shape and position.
% Wait for user to finalize the size and location.
xyCoordinates = wait(hEllipse)
I think you could just save hEllipse or xyCoordinates to a .mat file and that would take up a lot less space than the mask image.
  4 Comments
Syeda Noor
Syeda Noor on 27 Dec 2020
How to create a binary mask of colored image of circular shape. For segmentation purpose.
Image Analyst
Image Analyst on 27 Dec 2020
Syeda, probably by thresholding. After you use the Color Thresholder on the Apps tab, post your code and image in a new question if you have any trouble.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!