Selecting multiple ROI in images for processing

12 views (last 30 days)
I would like to select multiple rectangular regions in an image and would like to plot the selected 2D region's as 1D plots.How can I do this in matlab. Also is there a easy way to use the same ROI on multiple images.
  2 Comments
萌萌
萌萌 on 9 Aug 2022
hello,
How can we use matlab to transform an image into short lines in the length of micrometers,
all short lines will represent the grayscale, or maybe the lightness of the image,
after we get the short lines file, we will use it for etching out textures.
Thank you.
Mikko

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 9 Aug 2022
Edited: Image Analyst on 9 Aug 2022
  3 Comments
Image Analyst
Image Analyst on 9 Aug 2022
OK, I've uploaded all my roi drawing demos and attached them to my original answer.

Sign in to comment.

More Answers (1)

yanqi liu
yanqi liu on 9 Aug 2022
yes,sir,may be use roipoly to make shape,such as
im = imread('cameraman.tif');
figure; imshow(im); hold on;
pts = [];
while 1
[bw,xi,yi] = roipoly(im);
hold on;
pts{end+1} = [xi(:) yi(:)];
plot(xi(:), yi(:), 'r-');
tm = [];
for i = 1 : length(xi)-1
tm=[tm; xi(i) yi(i) xi(i+1) yi(i+1)];
end
im=insertShape(im,'Line',tm,'Color','r','LineWidth',1);
choice = questdlg('break?', ...
'break', ...
'Yes','No','No');
switch choice
case 'Yes'
break;
case 'No'
continue;
end
end
when we run,we can get

Community Treasure Hunt

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

Start Hunting!

Translated by