How can I color the specific region of the image?

4 visualizaciones (últimos 30 días)
Junaid Qadir
Junaid Qadir el 10 de Abr. de 2020
Hi!
My dear seniors and experts,
I want to change the color of specific region in an image. The background color should be different from the eyes color of the image shown below. Please help me in this regard. Thanks
img = imread('C:\Users\Junaid Khan\Desktop\jun.png');
bn=im2bw(img);
imshow(bn)
bn=bwareaopen(bn,100);
imshow(bn)
[L,n]=bwlabel(bn);
imshow(label2rgb(L));
prop=regionprops(L);
The above is the input image and while I run this code the output is like this.
I want to change the eyes and mouth color and also the background color should not be same.
Thanks

Respuestas (0)

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by