开发者

Detecting eye brows of a face [EMGU CV/Open CV/C#]

I am quite new to Emgu CV and I have absolutely tested out most of the codes such as Hough Lines / Canny Edge detection and googled papers but I am still at a loss.

This is what I've done

1) Detect a frontal face with HaarCascading 2) Break specific regions of the face (to prevent less false positives and save CPU power) , and detect eyes, nose, mouth at the specified region.

What I want to do is also detect eyebrows. I cannot find HaarCascades for eyebrows and I can append a specific region to the above, to scan for eyebrow. I have tested out Hough Lines and Canny Edge, but I cannot get it to detect the brows (it is detecting some other parts of my face as lines).

Gray cannyThreshold = new Gray(255);

Gray cannyThresholdLinking = new Gray(0);

Image<Gray, Byte> gray = grayFrame.Convert<Gray, Byte>().PyrDown().PyrUp();

Image<Gray, Byte> cannyEdges = gray.Canny(cannyThreshold, cannyThresholdLinking);

            LineSegment2D[] lines = cannyEdges.HoughLines(
                cannyThreshold,
                cannyThresholdLinki开发者_如何学编程ng,
                1, //Distance resolution in pixel-related units
                Math.PI / 45.0, //Angle resolution measured in radians.
                1, //threshold
                10, //min Line width
                3 //gap between lines
                )[0]; //Get the lines from the first channel
            List<MCvBox2D> boxList = new List<MCvBox2D>();

            foreach (LineSegment2D line in lines)
            {
                frame.Draw(line, new Bgr(Color.Green), 2);
            }

I am quite new to EMGU CV and have worked on this eyebrow detection for a few weeks - can anybody kindly advise how I can be able to do this?

Will greatly appreciate any help or advice. :)


Hough Lines and Canny Edge are not really any good for eyebrows and there is no Haar detector for eyebrows. You could try making your own but this would not be a suggestible approach. You have done a good portion of the work by detecting the eyes within the image. The best approach you can take now is to take an ROI above each eye from the colour image. Then use colour analysis to detect the eyebrows. From this ROI you should be able to detect the colour of the skin say from each corner.

Using this data you can scan this ROI and any data that is not within a threshold say +- 10% in values then you could consider this to be eyebrow data. Obviously this will need a little playing with to make work. Trying different image types such as HSV way increase accuracy.

If you need any help with the code let me know and I'll sort an example out for you. I answered a similar question on segmenting the skin of the face a neck in opencv which might be good reference. EmguCV Cut Face+Neck Skin Only And Save New Image

I hope this helps,

Cheers,

Chris

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜