Python

Examples

Name
Description

Help you verify development environment setting

Connect to the camera and print camera info

Retrieve camera frames, convert to OpenCV Mat then display

Region of interest

Get the depth value by pixel coordinate (x,y)

Align depth and RGB frame to the same coordinate

Get the data only in desired distance only

Use range filter to filter out the background

Record camera streams for NiViewer playback

Prerequisite

Make sure to install OpenNI2 SDK first.

Install openni python package.

pip3 install openni

Import package

from openni import openni2

Initialize with OpenNI REDIST folder path

openni2.initialize(os.environ['OPENNI2_REDIST'])

Last updated