From: Hrishi on
Hello everybody,

I am working on a small assignment where I want to separate a hair from the skin. I have a high resolution input video sequence which has skin and hairs. So we can see atmost 3 to 4 hairs in a single frame. I have performed some morphological operations with thresholding to get 80% of accuracy but still didnt find a way to get neatly 100% accuracy. Hairs can be dark or sometimes somewhat transparent and hence it becomes hard to differentiate it from the skin.

Can anybody suggest me a better way to do the same ?


Thanks in advance,
Hrishi
From: us on
"Hrishi " <hrishi_24h(a)yahoo.co.in> wrote in message <i24ogn$b99$1(a)fred.mathworks.com>...
> Hello everybody,
>
> I am working on a small assignment where I want to separate a hair from the skin. I have a high resolution input video sequence which has skin and hairs. So we can see atmost 3 to 4 hairs in a single frame. I have performed some morphological operations with thresholding to get 80% of accuracy but still didnt find a way to get neatly 100% accuracy. Hairs can be dark or sometimes somewhat transparent and hence it becomes hard to differentiate it from the skin.
>
> Can anybody suggest me a better way to do the same ?
>
>
> Thanks in advance,
> Hrishi

ok... now: where's your question re ML language(?)...

us
From: David Young on
It would help if you showed an example image, by putting it on an accessible site. Also, perhaps you could tie your question in more closely to Matlab.

In general, though, what you have to do is to set out what properties the object has that distinguishes it from its background, and then write code that relates to these. In the case of hair on skin, I guess the elongated shape, with perhaps a limited range of widths, would be a key piece of evidence. The question then becomes one of finding processes that exploit this. Working these out may be a significant project.

Another important questions is: what accuracy do you require, and how do you measure accuracy?
From: Hrishi on
"David Young" <d.s.young.notthisbit(a)sussex.ac.uk> wrote in message <i24r30$s2o$1(a)fred.mathworks.com>...
> It would help if you showed an example image, by putting it on an accessible site. Also, perhaps you could tie your question in more closely to Matlab.
>
> In general, though, what you have to do is to set out what properties the object has that distinguishes it from its background, and then write code that relates to these. In the case of hair on skin, I guess the elongated shape, with perhaps a limited range of widths, would be a key piece of evidence. The question then becomes one of finding processes that exploit this. Working these out may be a significant project.
>
> Another important questions is: what accuracy do you require, and how do you measure accuracy?

Hey david,
thanks for your quick reply.

http://tinypic.com/r/30hsm5f/3

You can find snapshot of a skin with hairs in the high resolution on above link.You can easily make out that this image is quite tough for segmentation as it has transparent hairs as well.
I tried different morhpological and other image processing functions from matlab.
e.g. I apply median filter to blur the background i.e. skin and to remove small speckle noise .Then As certain parts of the skin are saturated, I use hole filling to fill them and make background somewhat of same color or gray level. Now hairs are somwhat darker than the skin but still in many cases transparent hairs are almost of skin color and hence thresholding becomes critical. And also because of uneven luminosity in the video same hair sometimes gets detected in one image but not in the other or sometimes gets detected partly.

Ya. about your suggestion, I am still in doubt how can I use elongated shape approximation i.e. how can I approximate the hair with elongated shape. Should I use hough transform ?

But not all hairs are elongated, they may have some other shapes as well, like just a cirlcle (if viewed from top).


Even I tried to use contour finding, but could not understand the structure which imcontour returns!!...


Is my approach correct ?
Actually I have tried lot of operations from image processing (like simple morphological operations and spatial filtering ) using matlab. It detects hair but not always. 80% of times it detects the hair but sometimes it shows small part of background as a hair or small part of the hair as background.



Thanks again,
Hrishi
From: Hrishi on
"us " <us(a)neurol.unizh.ch> wrote in message <i24pao$43g$1(a)fred.mathworks.com>...
> "Hrishi " <hrishi_24h(a)yahoo.co.in> wrote in message <i24ogn$b99$1(a)fred.mathworks.com>...
> > Hello everybody,
> >
> > I am working on a small assignment where I want to separate a hair from the skin. I have a high resolution input video sequence which has skin and hairs. So we can see atmost 3 to 4 hairs in a single frame. I have performed some morphological operations with thresholding to get 80% of accuracy but still didnt find a way to get neatly 100% accuracy. Hairs can be dark or sometimes somewhat transparent and hence it becomes hard to differentiate it from the skin.
> >
> > Can anybody suggest me a better way to do the same ?
> >
> >
> > Thanks in advance,
> > Hrishi
>
> ok... now: where's your question re ML language(?)...
>
> us


Hello us,

thanks for your quick reply.
I have done all these operations using matlab. I am quite new to matlab hence not totally aware of all the functions and the operations.
I was wondering how can I achieve mentioned goal using matlab ?
what kind of approach would help me to make my algorithm more robust ?
Are there any specialised functions in ip toolbox which will do this for me or are there any functions which I can use in my algorithm ?

Thanks again for your help,
Hrishi