Kinect v2 with Openni 2 and show with OpenCV 3.1.0 - opencv

I am a newbie in programming and very much in Computer Vision. I am assigned a project in university to detect objects using the Kinect2 sensor.
I am trying to open Kinect 2 sensor via opencv 3.1.0 with VideoCapture method. I am using device.open (CAP_OPENNI2) method to open the Kinect rgb stream and retrieve it into an OpenCV Mat.
Before this, I have built the OPenNI from the source available on the Occipital's GitHub repo: https://github.com/occipital/OpenNI2/tree/kinect2/Source/Drivers
It has a Kinect2 driver and I was successful in building the Kinect2.dll binaries.
I then built OpenCV 3.1.0 from source with the flag "WITH_OPENNI2" and linked the Includes and Lib path to the OpenNI 2.2.0.33 I built with Kinect2 driver.
Though the OpenCV build was successful and I had all the binaries, linked it to VS2013 and also the OpenNI binaries, I couldn't still open the Kinect 2 sensor.
Has anybody succeeded in doing so?
Kindly help.
Best Regards,
Gholam
||.

I got it working some time ago - but it was not reproducible.
Did you get any images using the example programs of the Kinect SDK and the OpenNI Viewer?
Take a look at http://answers.opencv.org/question/85646/openni-22-kinect-v2-driver/ please. They suggest to use the Microsoft Kinect SDK without OpenNI.

Related

Using kinect with OpenNi

I am newbie to kinect and openNi. But according to some old tutorials I have tried installing kinect sensor(primeSensor) and OpenNi for object detection with kinect. But as OpenNi project is closed now, I am not able to find alternatives to OpenNi, I also tried pcl libraries, but I was stuck there as I couldn't run any project because of: 'Entry point is not found error'.
I need to use kinect for object detection with windows 7 32 bit. I wanted to use pcl libraries with openNi.
Can anyone please guide me what should I do? Or it'll be really grateful if anyone could tell me from where should I start. Please give me some new tutorials for using kinect.
I use kinect 2.0, pcl and OpenCV in VS2012, OpenNI is no longer supported and I suggest you grab Kinect frame by this(it works fine):http://unanancyowen.com/?p=1232

OpenCV codes in Code Composer (CCStudio)

I'm using CCStudio v5 to implement a vision system and want to use OpenCV functions in my code, but I don't know it is possible to use OpenCV code in CCStudio or not!
How I can import OpenCV library into my CCStudio project? Is this depends on my hardware?
There is no official release of OpenCV for system without OS. OpenCV library is available for Windows, linux, mac, Android and Ios operating system.
Here
you can find a link which explain the challenges of having OpenCV running on microcontrollers

what are the advantages of using javacv than opencv?

I'am developing an eye gaze estimation desktop application for my final year project. I wanted to know what are the main advantages of using javaCV instead of OpenCV ?
OpenCV is a very good Computer visio library. It has C, C++ and Python API. JavaCV is Wrapper of OpenCV using java.
Based on your application you can use native C API using Android NDK. If you are focus on Java then you can use JavaCV.
Also you can have a look at this and some tutorial.
JavaCV is just a non-official Java version of OpenCV.
That said, use JavaCV if you are going to develop in Java, and use OpenCV otherwise.
There is no tutorial for javacv. Sometimes you can't find the curresponding java implementation for Opencv's class(c++ code).Don't get frustrated.Just try to implement it in your own way and open source it.So, others can use it.Be a leader.All the best.

Converting depth_image from Kinect to OpenCV classic format(IplImage) for displaying

I am working with OpenCV2.4.5 and OpenNI2.0 (with SDK Kinect 1.6) on visual studio 2012. I try to develop an application of gaze tracking, for that i use "Kinect sensor" to get image_data and i want to process this ilage on OpenCV (Features extraction and machine learning).
If any one has an example or or a good tuto, it will be very helpful for me.
Best regards.
why not start with an opencv sample here ?

How to setup OpenNI 2.0 with OpenCV for a Kinect project?

I am working on my final year project. I need to work with Kinect to detect hand movements. I have tried a few ways and got some results, however, none was enough to meet the needs of the project. I saw this video long ago, and just got to know that they open sourced it recently. So I gave it a try.
My problem now is how to set things up.
The above awesome project uses OpenNI with Kinect. I tried to follow OpenCV tutorials to build it from source code, to let OpenCV work with OpenNI.
Problems:
It says "For the OpenNI Framework you need to install both the development build and the PrimeSensor Module." but as I followed the links some of them were dead. Seems like OpenNI 2.0 doesn't use PrimeSensor any longer.
It also says that in Cmake folders, one is OpenCV/Src, the other is /build. But the OpenCV I downloaded doesn't have anything as Src folder.
Still I used the whole folder as Src, and built it to a build folder and checked WITH OPENNI. I used the Include and Lib folder in OpenNI2 I downloaded, but when I built the OpenCV solution (already generated from CMake) all builds failed.
Also, while generating with Cmake, even if my future OpenCV solution had been successfully built (which wasn't the case), Cmake would have kept telling me how PrimeSense was not available, which made me feel so insecure. :(
I am a bit confused about 32- and 64-bit. The above project I want to follow says it works on 64-bit. But I use MS C++ Express, all projects are 32-bit. So which PrimeSense drivers (given in OpenNI2) should I use?
Could anyone please tell me how to set all these things (OpenNI2.0, OpenCV 2.4.3, PrimeSense) together so I can work with Kinect?
A while back I wrote two tutorials on 1) how to set up OpenNI 1.5 with NITE 2) How to compile OpenCV with OpenNI support.
These can be found here and here
I know this is not what you asked for, but the process of compiling OpenCV with OpenNI 2.0 should be similar and might help you understand where you are going wrong.
I will try to write a newer tutorial, however since I currently do not have access to a sensor, I might not be able to test if it works out in the end.
EDIT:
I have written some code to access Kinect data streams in OpenCV Mat format using OpenNI 2.x. The code github repo can be found here. Detailed guidance on how to set everything up can be found here.
OpenNI 2.x is much advanced than the previous versions. You don't need to install primesense sensorkinect driver. You can use OpenNI 2.x along with the Microsoft Kinect SDK 1.x.
Install both 64 and 32-bit OpenNI 2.x if you have Windows 7 x64 otherwise only 32-bit. Configure it with Visual Studio 2010 or 12. You can follow this video:
http://www.youtube.com/watch?v=ACqPsV0R4to
Then configure OpenCV for visual Studio 2010 or 12. You can follow this link:
http://4someonehelp.blogspot.in/2013/04/install-opencv-245-using-visual-studio.html
Thanks

Resources