Segmentation of the microscope circle
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ramanaesh Rao
am 22 Mär. 2021
Kommentiert: Ramanaesh Rao
am 23 Mär. 2021
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 Kommentare
Akzeptierte Antwort
KALYAN ACHARJYA
am 23 Mär. 2021
Bearbeitet: KALYAN ACHARJYA
am 23 Mär. 2021
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 Kommentare
KALYAN ACHARJYA
am 23 Mär. 2021
Bearbeitet: KALYAN ACHARJYA
am 23 Mär. 2021
You have to load the image first-
rgbImage=imread('Imagefilename.jpg');
%......................^Check the image file name & extention
%After this paste previous code
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Biomedical Imaging finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!