Sam W
Sam W

Reputation: 243

Obtain depth(z) from infrared camera view Kinect V2

I'm using the Xbox One Kinect (V2) to grab the infrared camera view, I then do some processing with that frame. From that I'm given an x,y coordinate in the infrared view. I would like to know how I would go about finding the depth(z) of that x,y value. I've played with coordinate mapper, but can't quite figure it out; if that's even the right thing to be using!

Any help is appreciated!

Upvotes: 1

Views: 431

Answers (1)

JavaNullPointer
JavaNullPointer

Reputation: 1211

Cause of depth-frame and infared-frame have the same imagesize you could just get the z value from your depth frame.

Just look in the samples how to copy the depth-frame to an byte[].

Afterwards this would help you:

double depth=(double)depthPixels[_xPos+_yPos*_width];

Upvotes: 1

Related Questions