How do I save the coordinates that I find freehand
Show older comments
Hi there, i'm almost new in Matlab and I have a really big question:
I have 21 images. Taking the last of these images as a reference: I have to find 7 freehand square roi on the image (maybe with impixel or imcrop function). Save the coordinates and use the same coordinates to crop the ROIs in the same positions as the reference image.
For now I have only been able to start a loop that read the 21 images. The format of the images is dicom, but It changes just the imread function with dicomread
srcFile = dir('DIR\*.dcm');
%change with DIR the file destination
pathname = ('DIR\');
for i=1:21
filename=(num2str(i));
%the files are named to the corresponding number. For example the first image is named as "1"
I=dicomread(strcat(pathname,filename));
info=dicominfo(strcat(pathname,filename));
figure; imshow(I);
end
Accepted Answer
More Answers (0)
Categories
Find more on ROI-Based Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!