How to seperate the circle object from the background.

4 visualizzazioni (ultimi 30 giorni)
This is the image sample that I want to separate the object(in this case is the medicine)

Risposte (1)

Matt J
Matt J il 9 Nov 2022
Modificato: Matt J il 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,[])

Categorie

Scopri di più su Images in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by