locate a perfect circular boundary of a segmented region

조회 수: 1 (최근 30일)
Walaa
Walaa 2022년 10월 27일
답변: Image Analyst 2022년 10월 29일
%segementation of cup using active counter(snakes)
I = imread('after opening 1.jpg'); %-- load the image
Error using imread>get_full_filename
File "after opening 1.jpg" does not exist.

Error in imread (line 372)
fullname = get_full_filename(filename);
m = zeros(size(I,1),size(I,2)); %-- create initial mask
m(300:329,300:329) = 1;
I = imresize(I,.5); %-- make image smaller
m = imresize(m,.5); % for fast computation
subplot(2,2,1); imshow(I); title('Input Image');
subplot(2,2,2); imshow(m); title('Initialization');
subplot(2,2,3); title('Segmentation');
seg = region_seg(I, m,220); %-- Run segmentation
subplot(2,2,4);figure, imshow(seg); title('segemented cup');
imwrite(seg,'segemented cup 1.jpg')
I segmented the Cup region using an active counter (snake). Now I want to locate the segmented region on the original image as a perfect circular boundary. Could you assist in modifying the code to accomplish this?

채택된 답변

Image Analyst
Image Analyst 2022년 10월 29일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Biomedical Imaging에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by