Placing and labeling ROIs on an image
2 次查看(过去 30 天)
显示 更早的评论
Hi!
I'm looking to place ROI circles of the same size on about 5-10 coordinate points in an image.
So far, I've extracted and plotted the coordinates of these points by clicking on them with crosshairs:
imshow(Image,[]);
set(gcf, 'units','normalized','outerposition',[0 0 1 1]); %For fullscreen
[x, y] = getpts; % I know this function isn't recommended any more, any better ideas?
hold on
plot(x, y, 'o', 'MarkerSize', 5, 'MarkerEdgeColor','green', 'MarkerFaceColor','green');
hold off
(Green dots in the image)
What I'd like to do further is to place circle ROIs of a specific radius on each dot, and create a mask with each circle ROI separately, retaining its specific coordinate information.
It would be ideal to have labels for each circle ROI on the final image.
I look forward to hearing your suggestions!
Thanks,
Veena
2 个评论
Image Analyst
2020-3-9
Where do you want to place the circles? Where the user clicks? Random locations? Some locations determined from the image content?
Anyway, once you have the locations decided upon, you can either use
plot(x, y, 'ro', 'MarkerSize', 30);
and change the MarkerSize to whatever you want.
Or else to get exact radii in pixels, use the FAQ: https://matlab.fandom.com/wiki/FAQ#How_do_I_create_a_circle.3F
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!