Ask Your Question

Hwang0209's profile - activity

2017-02-19 08:07:06 -0500 asked a question How can I connect the kinectV1 with OpenNI2?

I have some problem about connecting the kinect using opencv 3.2 and openni2.
First I installed OpenNI2 and NiTE2 then, I make a opencv 3.2 build with OPENNI2 flag and it worked successfully.

I made a project and set the option (such as library directory, linker..) and made simple program (showing depth image).

Compile was successful, but when the program try to open device (;),
the program printed error messages like this.

OpenCV Error: Unspecified error (Failed to initialize:) in CvCapture_OpenNI2::CvCapture_OpenNI2, file C:\Users*\Downloads\opencv\sources\modules\videoio\src\cap_openni2.cpp, line 222 VIDEOIO(cvCreateCameraCapture_OpenNI2(index)): raised OpenCV exception: C:\Users*\Downloads\opencv\sources\modules\videoio\src\cap_openni2.cpp:222: error: (-2) Failed to initialize: in function CvCapture_OpenNI2::CvCapture_OpenNI2

I don't know what problems are occurred in my program.
When I use OpenNI's NIViewer, kinect worked successfully.
How can I solve this problem?