Microsoft Kinect - openNI Hand Generator issue - c++

I am trying to use a kinect device in order to detect the palm within a kinect video(.oni video). I am using openNI libraries to develop this type of application.
They have published a manual of the basic features available within the openNI which can be seen here.
I have tried to implement the code which they displayed in the hand detection section, however, I don't have any results.
Do you happen to know where can I find a tutorial for a basic hand detection application for kinect through openNI library?

I started with OpenNI User Guide and it was very useful. There is a working example called "Working with Hand Point". If you want more powerful hand recognition you can try NITE. You can have working sample following this tutorial, it is for Linux, but most part of it will work even for Windows.

You can start with :
http://channel9.msdn.com/coding4fun/kinect/Simple-Hand-Tracking-with-MS-Kinect-SDK--WPF

Related

Kinect xbox 360

I am new on using a Kinect sensor, I have Kinect XBOX 360 and I need to use it to get a real moving body 3D positions. I need to use it with c++ and openCV. I could not find anything helpful on the web. So, please if anyone can give me some advice or if there any code for opening Kinect XBOX 360 with c++ to start with I will appreciate that.
Maybe try this library: https://github.com/OpenKinect/libfreenect . If you don't have to use C++ obviously the C# drivers for the xbox Kinect by Microsoft are quite useful.
You're going to want to use OpenNI (https://structure.io/openni) for this. It will make your life infinitely easier. I believe you can even compile OpenCV with OpenNI support out of the box.
You'll probably also want to download and compile PCL (http://pointclouds.org/), which will make managing and manipulating the 3D data a lot easier.
To build a cohesive 3D "world", you'll want to use a fusion library like KinectFusion, which is actually baked into PCL already (https://github.com/PointCloudLibrary/pcl/tree/master/gpu/kinfu).
For object recognition, you'll want to use a classifier, of which OpenCV and PCL have many.
There are a plethora of tutorials and examples using the Kinect as an RGBD source.

How to distinguish OpenCV cameras?

I am writing C++ class for managing multiple cameras and reading frames from them. Let's say it is wrapper for OpenCV. Currently I am finding cameras by trying to create devices from 0-10 range and If there is output I know that I've found working camera. I can always save internal IDs of those cameras to distinguish them but what If another camera is plugged in? It may break the order of IDs. So is there any way to distinguish OpenCV cameras for example by getting their hardware IDs?
I know this doesn't help you much, but the short answer is "No, OpenCV doesn't currently provide that capability."
According to the doc, any hardware ids are not properties you can retrieve using the get method or any other.
Having said that, if you're very intent on using OpenCV, I would still test the behavior of OpenCV 2.4.10 on various platforms and using various middleware and see how it behaves. If you get a consistent behavior, then you can run with it, but be somewhat ready for it to break in the future. What would work for you is that OpenCV is using various middleware in the backend, such as V4L, Qt, etc., and these are well-maintained and more-or-less consistent.
In retrospect, I would stay away from OpenCV's video interface altogether right now for commercial software, unless you're okay with the situation I described. Beware that OpenCV 3.0 videoio library is unstable at this point and has open bug reports.

OpenNI Body Gesture Recognnition?

I was wondering of there is a way for OpenNI to recognize a movement such as crouching or running in place? And could you have hand, finger and body recognition all running at the same time?
I played with pose estimation a while back, but that's not the same as gesture recognition which also involves time.
I recommend having a look at Dynamic Time Warping(DTW) as a useful technique.
Also have a look at the KineticSpace project which makes use of this technique.
It's written in Processing(Java) and uses a wrapper, but it still uses OpenNI under the hood.
This should help you work out crouching and perhaps running.
Regarding your second question: you get body recognition and hand tracking for free with OpenNI/Nite, but you'd have to do the finger detection yourself.
Here are few random results found on Google:
Kinect Core Vision
Finger Tip on CodePlex
ROS Finger tracking
There are more examples out there, it depends on what language you use and how comfortable you are coding.
HTH

How to start learning the basics to write program in C++ for XBOX 360 KINECT for developing windows application?

I have a basic knowledge of c++. And i want to learn how to write program for Kinect Sensor.
I have seen many websites with examples of programs for Kinect Sensor in c++, but none of them have explained it well enough to understand whats happening in the code they have written.
so tell me how can start learning the basics to write programs for Kinect Sensor.
if there are any tutorials (preferably video tutorial), so tell me about them also.
Thank You In Advance.
Kinect C++ here : http://www.codeproject.com/Articles/394975/How-To-Use-Kinect-Face-Tracking-SDK
and here : http://nsmoly.wordpress.com/2012/05/21/face-tracking-sdk-in-kinect-for-windows-1-5/
There are videos and documentation at the Kinect Learn site. You should probably start from there.
A quick google brings up this page which is a C++ Kinect tutorial. It's in Russian, but Google Translate could help you with that: http://habrahabr.ru/post/123588/
Also this similar (but poor quality so now closed) question may be of use: Kinect with OpenGL

interact with a pc camera using c++

i intend to interact with a pc camera using c plus plus. Are there any libraries you can recommend or ways to go about ? The idea is to take shots with a Samsung wireless cam then get the images transferred unto a pc with cam and on the pc show images as per the face detection using the cam . any ideas where to start ?
Well, there's a wide range of ways to do it. Professional cameras have accompanying SDKs. If you camera is supported by it (I believe most webcams are) you should try OpenCV for a start.
Googling for "opencv face recognition" will yield plenty of hits, so you have a lot of reference material.
Try this reference (Face and Eyes Detection Using OpenCV) for a start.
After you start your project, you can specific questions on StackOverflow or on the OpenCV Yahoo! group.
Other options are:
1) openFrameworks.
Quoting from their website:
Openframeworks is a c++ library designed to assist the creative process by providing a simple and intuitive framework for experimentation.
The library is designed to work as a general purpose glue, and wraps together several commonly used libraries under a tidy interface: openGL for graphics, rtAudio for audio input and output, freeType for fonts,freeImage for image input and output, quicktime for video playing and sequence grabbing.
2) Qt
If you decide Qt, see this related question: Displaying WebCam video with Qt