Frage

Ok, assuming that I have correctly working the alghoritm that detect and encapsulate the hair of a portrait picture.

How can i (witha a high % correctness), differentiate between colors?

I know it seems simple, but the main problem is that depending on either the environment light conditions of where the picture were taken or (the less cases) post effect processing, a range of "blond", "black", "brown" and "red" change a lot, given false positive and some times no detecting correct ones. (Passing a blonde as black fore example).

Using opencv (or any other tool, because I already have the hair), which pre processing algorithm or methods should I apply to "normalize" this kind of problems and minimize errors?

Thanks a lot.

War es hilfreich?

Lösung

I think you can use machine learning methods for color classification. Just train classifier (e.g. SVM or neural network) on hear color samples (you can take color histogram as input vector), and some classes (color names). I think it will be good method fo deal with light changes, noise, shadows, etc. And I think it'll be better use some advanced color space L*a*b* or HSV.

May be you will need include in input vector some reference historgam (for get data about lighting conditions). You can get it from face for example (not the best solution).

Andere Tipps

I don't believe that you can do any pre-processing just using the hair area. I'm saying this just by intuition.

Here is an idea. Histogram equalization is a famous pre-processing method that overcomes illumination effects to some amount. So what you can do is, separate your image into color channels, apply histogram equalization to each of the channels, and then combine the channels to get the histogram equalized image. I think that it would be useful.

I've implemented it on Matlab, tried it on Lena. You can download it from here (dead link).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top