How to seperate the circle object from the background.

4 visualizaciones (últimos 30 días)
Warisa Theerathamtada
Warisa Theerathamtada el 9 de Nov. de 2022
Editada: Matt J el 9 de Nov. de 2022
This is the image sample that I want to separate the object(in this case is the medicine)

Respuestas (1)

Matt J
Matt J el 9 de Nov. de 2022
Editada: Matt J el 9 de Nov. de 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,[])

Categorías

Más información sobre Images en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by