Is there any way to fill this shape?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hanis nadhirah
el 14 de Nov. de 2019
Editada: hanis nadhirah
el 14 de Nov. de 2019
I have try imfill but the shape still like that , upper one is circle and beside that is triangle. Thank you
Please do not copy the codes. Thank you.
4 comentarios
Respuesta aceptada
Matt J
el 14 de Nov. de 2019
Editada: Matt J
el 14 de Nov. de 2019
I=imread('shapes.jpg'); % to extract orange color
A=(I(:,:,1) >= 245 ) & (I(:,:,1) <= 255) & ...
(I(:,:,2) >= 121 ) & (I(:,:,2) <= 161) & ...
(I(:,:,3) >= 0 ) & (I(:,:,3) <= 13);
H=rgb2hsv(I);
B=H(:,:,1)<=0.12 & H(:,:,2)>=0.97 & H(:,:,3)>=0.97;
B=imfill(A|B,'holes');
5 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Modify Image Colors en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!