# Skin segmentation with thickness and angle calculation

Hello !

I’m currently in my last year of bioengineering, and so I’m working on a final project about skin aging with image processing based on pictures taken from microscope and fluorescence. At this time we have designed a strategy on how we should and how we want to build our algorithm. Here below you can see the pictures we’re working on :

The aims of the project are concerning measurement. We have to determine the thickness of the skin, the number of intussusceptions and the angle between the “main flow” and each intussusception.

First of all we tried to do a segmentation and a binarization of the region of interest. Here are the results :

Then we have done some erosion for digging into each intussusception. The result is below :

At this point, the process is getting well. After that we have planned to get the skeleton of the banalized picture in order to identify and locate the intersection point between the “core” and each branch, and the ending points of the skeleton, with the Hit or Miss algorithm (based on patterns and number of neighbors of each pixel of the skeleton). The problem is here, we are not able to produce good skeletons from our banalized pictures. Those skeletons are pretty ugly and have some loops as you can see below.

So we are currently unable to do our calculation of angles.

Can someone tell us what’s wrong with our strategy ? Why our skeleton is so ugly ? Any suggestion or other ideas to calculate these angles ?

Hi @sebgra,

It would be really helpful if you posted an image with an aproximate drawing of the skeleton you are trying to get.

Anyways, if your goal is to measure the angle of the epidermis to each of the underlying “fingers” that separate the papillae, you could try running this code on the eroded images to get a better skeleton:

``````run("Gaussian Blur...", "sigma=15");
setAutoThreshold("Default dark");
run("Skeletonize");

``````

Best,
Nico

Hi @NicoDF !

Thanks for this answer ! The type of skeleton that I want is something similar to what you’ve produced I’ll try it and post the results there once it will be done.

EDIT : I used to work with scikitimage, so I would like to be sure to understand what you have done. First apply a gaussian filter with a kernel of 15, then apply a threshold to the result, and then skeletonize, is that correct ?

EDIT 2 : It seems that I’ve done it correctly

We use to display images on jupyter notebook that’s probably why the skeleton seems to be splited. The next step is now to analyse the skeleton with the measurement of the angle between branches, and to measure the thickness of the epidermis. Maybe I should work on distances ?

Best,

Seb