ni-simple-read
Overview
This example demonstrate how to get the distance (depth) value from camera for a specific point
Expect Output
Tutorial
Import openni package
Initialize SDK
Connect to camera
Create depth stream and start it
Depth data is store in one dimension array in ordered, from top left to bottom right. We calculate the index of the center point of the frame according to the width and height first.
Read frame from camera and retrieve the depth data of
middleIndex
Full code
Last updated