ki_ki3939

How to use c#.net for face dection
do you have an example code
please let me know

thanks




Re: Visual C# General I would like to ask about Face Detection

Ryan McBeth

Ki Ki,

Odds are that if you are planning on doing some sort of face detection, packages already exist which will be much more extensive than anything that you can write by yourself. Most of this is probably written in C++ for the speed aspect, but you can probably p/invoke to it.

You also don¡¯t really state what kind of face detection that you want to do. Are you planning on detecting a face in a picture, detecting a picture is a picture of a face, rather than a picture of some other kind of object, or detecting that a face is the face of a certain person

If you are doing this as a school or personal project, I might try this: Take a picture of a face and convert it to a bitmap. Then search out in a spiral from the center of the picture, testing every couple of pixels until you see an area of extensive dark-light contrast. Odds are, this area is the eyeball. Search until you find the center of the dark spot. This will be the iris. Then search in straight lines out from this iris until you find the second iris. Measure the distance between the center of the two irises. The distance between the two irises will vary enough between people to give you a reasonable confidence that the picture is a face, and it is a certain person¡¯s face. This will probably work for a college project, but if this is for an industrial, or governmental application, you should probably take a look at existing packages.

Ryan





Re: Visual C# General I would like to ask about Face Detection

Timo S

That was very interesting answer Ryan! I'm willing to try that technique in some program.. Thanks!

Regards,
Timo Salomaki





Re: Visual C# General I would like to ask about Face Detection

Robert C. Barth

Try System.Drawing.Graphics.Face.Detect static method.



Re: Visual C# General I would like to ask about Face Detection

ki_ki3939

i want to detect a face in a picture.

you said that i have to find an area of extensive dark-light contrast

but the hair or the other objects can be dark too.

how can i know that are the eyes or the objects






Re: Visual C# General I would like to ask about Face Detection

Timo S

Ki Ki, try this link:

franck.fleurey.free.fr/FaceDetection/

Found it when searching with google. Keyword: "face detection C#"
It's the first link.