Segmentation of the microscope circle

1 回表示 (過去 30 日間)
Ramanaesh Rao
Ramanaesh Rao 2021 年 3 月 22 日
コメント済み: Ramanaesh Rao 2021 年 3 月 23 日
I would like to remove the black area(background) of these images so that I can segment only the targetted region, which is the circle. Please help, thank you in advance.
  2 件のコメント
darova
darova 2021 年 3 月 22 日
Did you try to binarize?
Ramanaesh Rao
Ramanaesh Rao 2021 年 3 月 23 日
Hi, yes I did but i lost the region of interest too.

サインインしてコメントする。

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 3 月 23 日
編集済み: KALYAN ACHARJYA 2021 年 3 月 23 日
You can direct thresold the largest black area. Here the shown code is quite lengthy, but it is easier to understand.
bwImage=imbinarize(rgb2gray(rgbImage));
mask=bwareafilt(~bwImage,1);
R_data=rgbImage(:,:,1);
G_data=rgbImage(:,:,2);
B_data=rgbImage(:,:,3);
R_data(mask)=255;
G_data(mask)=255;
B_data(mask)=255;
result=cat(3,R_data,G_data,B_data);
figure,imshow(result);
  3 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 3 月 23 日
編集済み: KALYAN ACHARJYA 2021 年 3 月 23 日
You have to load the image first-
rgbImage=imread('Imagefilename.jpg');
%......................^Check the image file name & extention
%After this paste previous code
Ramanaesh Rao
Ramanaesh Rao 2021 年 3 月 23 日
Thank you so much sir.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBiomedical Imaging についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by