Using kinect with OpenNi - opencv

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

Related

Kinect v2 with Openni 2 and show with OpenCV 3.1.0

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.

Using OpenCV in Android to find an image match

I am trying to build an Android application that compares a photo taken by the device camera to find a match in a set of images.
I have configured OpenCV on Android Studio, but that is quite it.
Could someone please help by linking to resources or suggesting tutorials?
The OpenCV documentation does not have anything on Android Studio and the sample codes seem to be in C++.
My idea is to do the same things... I've searched some samples on GitHub but I've not found almost anything useful... These are some links:
https://github.com/search?utf8=%E2%9C%93&q=sift+android&type=Repositories&ref=searchresults
https://github.com/search?utf8=%E2%9C%93&q=opencv+android&type=Repositories&ref=searchresults
we have almost the same project. this links might help
https://github.com/torcellite/imageComparator
https://medium.com/#akshikawijesundara/object-recognition-with-opencv-on-android-6435277ab285
in OpenCV there are plenty algorithm that we can use to find image match such as BRISK, ORB, FREAK, SIFT and SURF (SIFT and SURF available only in nonfree version since those algorithm patented).
I hope this will help

Distorted 3D reconstruction OPENCV + PCL (Martin Peris code)

I am using Martin Peris code for 3D reconstruction using OpenCV and PCL (link below):
http://blog.martinperis.com/2012/01/3d-reconstruction-with-opencv-and-point.html
Trouble point:
I am having trouble with the final step in viewing the 3D reconstruction in the "3D viewer" window. I am getting a perfect disparity image as shown in the blog but my final reconstruction image looks like this:
https://drive.google.com/file/d/0Bx1aNPhwJU4kMmt1cUVHVXBOLWM/edit?usp=sharing
You can compare this with the one which is shown in the video link given in that blog.
Things that I have tried:
Checked if all the required libraries are installed. I believe otherwise the code wouldn't compile and give me any results.
Checked if I have a graphics support on my machine:
$lspci | grep VGA
09:00.0 VGA compatible controller: NVIDIA Corporation G71GL [Quadro FX 3500] (rev a1)
My doubts:
If there is some library missing for OpenGL or OpenCV or PCL which is making the 3D reconstruction window suffer.
The controversial reprojectImageTo3D() function in OpenCV which is also used in the code by Martin Peris.
Some other reason that one of you could help me with ;-)
Other details:
Ubuntu Version : 12.04
OpenCV Version : 2.3.1-7
Any suggestions would really be helpful!
Thanks,
Pratul
RESOLVED!
It was actually a driver issue with my graphics card. To solve it I wiped off the currently installed driver and then re-installed an updated one and that worked like a charm.
Details of this solution I have posted on the PCL mailing list as I didn't wanted to repeat myself here.
enter link description here
I hope this helps.

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.

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