How to seperate the circle object from the background.

4 vues (au cours des 30 derniers jours)
Warisa Theerathamtada
Warisa Theerathamtada le 9 Nov 2022
Modifié(e) : Matt J le 9 Nov 2022
This is the image sample that I want to separate the object(in this case is the medicine)

Réponses (1)

Matt J
Matt J le 9 Nov 2022
Modifié(e) : Matt J le 9 Nov 2022
A=double(load('Image').A);
B=rgb2hsv(A);
C=bwareafilt(imbinarize(B(:,:,2)),1);
mask=imclose(C,strel('disk',15));
imshow(mask.*A/255,[])

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by