MATLAB Answers

Image Segmentation of human skin

10 views (last 30 days)
Hello,
I am struggling to find a way how to segment the two type of cell that we can see in the image below.
The main goal is to separate the two main zones and not to enter each cell.
I have tried to take a small crop of one zone and correlate it with the image then apply thresholding, but that doesn't give satisfying results, unless my code wasn't good.
I have tried to apply Kmeans, but it was too specific and it has separated the cells and the white and everything.
I would be thankful if you can propose a method or a code that could help me with my project.
skin1.jpg

  0 Comments

Sign in to comment.

Accepted Answer

Shunichi Kusano
Shunichi Kusano on 27 Feb 2019
I could show a result, though I'm not sure this meets you. The strategy is simple. First, non-skin (air?), shallower skin (bluish in image), and deeper skin are rougly separeted based on color. I used the Color Thresholder app in matlab, generating attached m-files. Then, mask arrays are refined by trial and error through imfill, bwareaopen and so on. I hope this helps.
%% read image
img = imread('skin1.jpeg');
%% mask generation
[BWAir,~] = createMaskSkin(img);
[BWDeepSkin,~] = createMaskShallowSkin(img);
%% Air-mask refinement
figure, imshow(BWAir);
BWAir_fill = imfill(BWAir, 'hole');
BWAir2 = bwareaopen(BWAir_fill, 100000);
figure, imshow(BWAir2);
%% Deepskin-mask refinement
figure, imshow(BWDeepSkin);
BWDeepSkinClose = imclose(BWDeepSkin, strel('disk',3));
BWDeepSkin_fill = imfill(BWDeepSkinClose, 'hole');
BWDeepSkin_fill = bwareaopen(BWDeepSkin_fill, 10000);
BWDeepSkin2 = imcomplement(bwareaopen(imcomplement(BWDeepSkin_fill), 2000));
figure, imshow(BWDeepSkin2)
%% boundaries visualization
figure(99)
imshow(img)
hold on;
visboundaries(BWAir2)
visboundaries(BWDeepSkin2)

  1 Comment

khaled arja
khaled arja on 27 Feb 2019
Sir ,
you are the man
thank you

Sign in to comment.

More Answers (0)

Sign in to answer this question.