Face Recognition for classifying digital photos? - c#

I like to mess around with AI and wanted to try my hand at face recognition the first step is to find the faces in the photographs. How is this usually done? Do you use convolution of a sample image/images or statistics based methods? How do you find the bounding box for the face? My goal is to classify the pictures of my kids from all the digital photos.
Thanks in advance.

Have a look at http://www.face-rec.org/algorithms/ - you'll see that there are a variety of ways of going about this.
Assuming you're wanting to code the whole thing yourself, you'll need to look into Bayesian Frameworks, Neural Networks, possibly maths ones like Linear Discriminant Analysis (LDA) and the cool-named Elastic Bunch Graph Matching.
However it's worth noting that there are sooo many people who have coded this around the world, that there are now ready to use, open source, off the shelf apps, apis and libraries that you can simply call. Or neural networks you can plug in - for example - TiNA.
Do a good bit of reading - it's a fascinating topic, and then decide whether you want to go through reinventing the wheel (hey, it's fun to code, but it may not be what you want to focus on) or whether you'll inherit and extend some library or API.
Enjoy!

Try this:
OpenCV
This should help you out with face detection and object recognition projects

OpenCv for C# OpenCvSharp
Sample Code for Face detect

you can try ASM,AAM
http://code.google.com/p/aam-opencv/
or some faceAPI
http://www.seeingmachines.com/product/faceapi/
http://www.luxand.com/facesdk/
http://betaface.com/

I have an OpenCV Face Detection and Face Recognition (Haar Face Detection + Histogram Equalization + Eigenfaces) tutorial and free source code that you could try: http://www.shervinemami.info/faceRecognition.html

Related

Kinect v2 SDK Clothes Detection

So, recently I managed to land myself a Kinect v2 project (hurray!) on my Industrial Placement which is supposed to detect if a person is wearing the correct PPE or (personal protective equipment to you and me).
Included in this scope is detecting if the person is wearing the correct:
Hazard Protection Suit
Boots
Gloves
Hat
A beard mesh! (Only if they have a beard)
I have only recently begun working with the Kinect v2 Sensor so you will have to forgive any ignorance on my part. I am new to this whole game but have worked through a fair few examples online. I guess I am just looking for advice/sources on how best to solve the problem.
Sources online seem scarce for trying to detect if a person is WEARING something. There are a couple of parts to this project:
Split up human into components (hands, feet, head, body) while retaining colour. This part I imagine would be best done by the Kinect SDK.
Give a percentage likelihood that the person's hand part is wearing gloves, head part is wearing hat etc... I've seen some ideas for this including graphics packages such as OpenCV.
I'm looking for advice concerning both parts of this project. Feel free to ignore the waffling below, but I thought it best to post some of my own ideas first.
Idea (and worked example) 1 - Point clouds
I have done some preliminary projects involving basic detection of humans. In fact, grabbing the VS project from this source: http://laht.info/record-3d-video-with-kinect-v2-and-play-it-back-in-the-browser/ I have managed to create a .ply file out of human beings. The problem here would be trying to split the .ply 3D image up to identify the suit, hat, gloves, boots (and I guess) beard. I imagine this is a fairly complex task.
Of the 3 ideas however, I'm coming back around to this one. Splitting up a 3D .ply image and trying to detect the PPE could turn out to be more accurate. Would need advice here.
Idea 2 - Blob Detection
Using this: http://channel9.msdn.com/coding4fun/kinect/Kinect--OpenCV--WPF--Blob-Tracking I pondered whether there would be a good way of splitting up a human into a colour picture of their "hand part", "head part", "body part" etc with the Kinect v2 SDK. Maybe I could then use a graphics package like OpenCV to test if the colours are similar or if the logo on the suit can be detected. Unfortunately, there is no logo currently on the gloves and boots so this might not turn out to give a very reliable result.
Idea 3 - Change the PPE
This isn't ideal but if I can't do this another way, I could perhaps insist that logos would need to be put on the gloves and suit. In this worst case scenario, I guess I would be trying to just detect some text in 3D space.
Summary
I'd be grateful for any advice on how to begin tackling this problem. Even initial thoughts might spark something :)
Peace!
Benjamin Biggs

Localization of a robot using Kinect and EMGU(OpenCV wrapper)

I'm working on small WPF desktop app to track a robot. I have a Kinect for Windows on my desk and I was able to do the basic features and run the Depth camera stream and the RGB camera stream.
What I need is to track a robot on the floor but I have no idea where to start. I found out that I should use EMGU (OpenCV wrapper)
What I want to do is track a robot and find it's location using the depth camera. Basically, it's for localization of the robot using Stereo Triangulation. Then using TCP and Wifi to send the robot some commands to move him from one place to an other using both the RGB and Depth camera. The RGB camera will also be used to map the object in the area so that the robot can take the best path and avoid the objects.
The problem is that I have never worked with Computer Vision before and it's actually my first, I'm not stuck to a deadline and I'm more than willing to learn all the related stuff to finish this project.
I'm looking for details, explanation, hints, links or tutorials to achieve my need.
Thanks.
Robot localization is a very tricky problem and I myself have been struggling for months now, I can tell you what I have achieved But you have a number of options:
Optical Flow Based Odometery: (Also known as visual odometry):
Extract keypoints from one image or features (I used Shi-Tomashi, or cvGoodFeaturesToTrack)
Do the same for a consecutive image
Match these features (I used Lucas-Kanade)
Extract depth information from Kinect
Calculate transformation between two 3D point clouds.
What the above algorithm is doing is it is trying to estimate the camera motion between two frames, which will tell you the position of the robot.
Monte Carlo Localization: This is rather simpler, but you should also use wheel odometery with it.
Check this paper out for a c# based approach.
The method above uses probabalistic models to determine the robot's location.
The sad part is even though libraries exist in C++ to do what you need very easily, wrapping them for C# is a herculean task. If you however can code a wrapper, then 90% of your work is done, the key libraries to use are PCL and MRPT.
The last option (Which by far is the easiest, but the most inaccurate) is to use KinectFusion built in to the Kinect SDK 1.7. But my experiences with it for robot localization have been very bad.
You must read Slam for Dummies, it will make things about Monte Carlo Localization very clear.
The hard reality is, that this is very tricky and you will most probably end up doing it yourself. I hope you dive into this vast topic, and would learn awesome stuff.
For further information, or wrappers that I have written. Just comment below... :-)
Best
Not sure if is would help you or not...but I put together a Python module that might help.
http://letsmakerobots.com/node/38883#comments

Skeleton tracking with 2D camera

I'm trying to use a 2D camera to recognize the device/object a user is pointing at so I was looking for a skeleton tracking software using a 2D camera in order to be able to do that. Is there any open source project that deals with skeleton tracking using 2D cameras?
(I've gone through tons of links on Google and it seems like most of what's there is just research papers but no actual open source projects)
Thanks!
Skamleton could be an option. It's an open-source project in early stages, but it implements a background subtractor, a skin color classifier, blob tracking and face classification. There is a demo on YouTube.
Note Skamleton use simple cameras, not RGB-D (depth) cameras as the Kinectic system (Kinect uses a structured light device from PrimSense).
It seems there's kind of a pre-release of a SDK for Kinect from Microsoft. Perhaps this might be helpful for you:
http://nuigroup.com/forums/viewthread/11249/
(Although I think this won't be Open Source. But since you are using c#, a Microsoft SDK might be ok for you.)
This seems like an old post, but in case anyone is still looking Extreme Reality uses a regular webcam and does skeleton tracking. It's not open source, but I've played around with it a bit and it does seem to be fairly robust.
http://www.xtr3d.com/developers/resources/

Image Outlining Effect in .NET

I'm looking to accomplish the following effect in C#:
alt text http://img638.imageshack.us/img638/1530/conversionj.png
Any ideas would be much appreciated.
Looks like a fairly standard edge detection algorithm. Wikipedia has some info on that. There are quite a few algorithms:
Canny edge detector
Sobel operator
Roberts cross
Prewitt
You might try the AForge Image Processing Library
Here's a project that will enable you to determine if AForge Image Processing is what you need.
Try doing a Floyd-Steinburg Binarization and then a Homogenous Edge detection... or some combination thereof.
I know your asking about C#, but if you don't find an existing C# implementation - perhaps you could port this to C#. It's written in Java, but it's open source. Having some code to start with seems like it would be nice.
There are multiple other filters also...
Here is their result:
(source: jhlabs.com)

Where can I find, or how can I build, a cartoonizer for C#?

I am working on the development of a Massively Multiplayer Online Role Playing Game (MMORPG) in .NET using C# and Silverlight. One of the features that has been requested for this game is to allow players to upload their own avatars.
Rather than displaying the uploaded images in their raw forms, we want to convert the images to a cartoon form--in other words to cartoonize the image.
Several sites which can accomplish such a task are listed at http://www.hongkiat.com/blog/11-sites-to-create-cartoon-characters-of-yourself/
I realize that these sites are applying an image filter to create the cartoon image. Frankly, I have no reasonable idea what these cartoon image filter algorithms might look like or if there is anything already available in C# or .NET that I could use. If there are no libraries available, I am curious how difficult it would be to roll my own.
This is a minor game feature so I am not interested in devoting a week or more of coding time to implement this. However, if I can code up what I need within a day, then it is probably viable.
At this point, I am primarily looking for guidance as to
what is possible
what libraries are already available (preferably as open source)
where i may find additional information
any other advice or guidance you may be able to provide
Thank you in advance!
Apparently you apply a Gaussian Blur filter to the image. Then you sharpen the image. Perhaps the AForge libraries would help you out.
I've used code from the image processing lab on code project before with success. (update: here's the library it uses)
Christian Graus also has written a whole series on GDI image processing which I found useful (and has the effects listed above for filtering capabilities).

Categories

Resources