Using Kinect for Windows v2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Kinect for Windows v2

Max S
This post was updated on .
Hey,

Im relly impressed by your work and wanted to test what it could do with the new Kinect for Windows v2.

I am working on windows 8 and got compiled your code with Visual Studio 2010. Then i tried to get the Kinectv2 working.

what i did:
- delete the test if a known RGBD Device is connected in bool CameraOpenni::init()
- implemented my own function takeImage in void CameraThread::mainLoop()
     - Question 1: RGB Image is 1920x1080. Is it OK if D-Image is 512x424 or must it have the same size.
     - Question 2: Must D-Image Pixels contain the Depth-Value for the corresponding RGB-Image Pixel
     - Question 3: Which Color Format must RGB Image have:

The Application always quits with the error:
[FATAL] .... Memory.cpp:3072::rtabmap::Memory::createSignature() Condition (data.image().empty || data.image().type() == CV_8UC1 || data.image().type() == CV_8UC3) not met!

It would be awesome if you could tell me which steps I have to do, to get your Code running with Kinect for Windows v2.


**********************
EDIT:

OK, it was too late on sunday yesterday. I fixed the problem with the wrong assert. I had a 4 channel image instead of 3 channels.

But I am still wondering if the DepthImage hast to be registered to the color image. So that Depth Value at Position (100/200) belongs to RGB Value at (100/200)

Thanks a lot.
Reply | Threaded
Open this post in threaded view
|

Re: Using Kinect for Windows v2

matlabbe
Administrator
Hello,

Yes the RGB image must be registered with the depth image, and they must be the same size. For the image format, I use those from OpenCV as you can see in the assert: BGR (3 channel) and Mono (1 channel). Check cv::cvtColor() method from OpenCV for conversion.

Regards,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Using Kinect for Windows v2

Max S
thanks for your reply,

solved it already yesterday.
Reply | Threaded
Open this post in threaded view
|

Re: Using Kinect for Windows v2

Andrew
Good day!

Can You describe, how You attach Kinect2?

Best regards, Andrew