npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node_kinect

v2.0.1

Published

A nodejs wrapper for the azure kinect SDK

Downloads

16

Readme

azure-kinect-node-wrapper

A wrapper for the Azure Kinect SDK < br /> Will only work on Node/Electron Projects. Web based projects cannot utilize Native Addons.

Getting Started

This package allows developers to access the raw image data from Microsoft's Azure Kinect Device. To get started you need: -Windows 10 -Azure Kinect Device

I'd like to setup for Ubuntu 19.04 once I can compile the SDK. So far I was unable to compile on linux which is why I did Windows first.

Installing

npm i --save node_kinect

Example Result using Three.js & Electron

alt text

Example:

Steps: -Require package -Create device -Open device -Configure Mode(Color, IR, Depth) -Configure FPS(5, 15, 30) -Start Camera --Get Frame --Process Frame Data --Release Image & Camera -Stop Camera

const kinect = require('node_kinect')

let myDevice = new kinect.AzureKinectDeviceWrapper(1)

let code = myDevice.openDevice()

if(code != 0 ){
  process.exit()
}

//Configure device
myDevice.configureDepthMode(1)
myDevice.configureFPS(15)

console.log(`Start Cameras Code: ${myDevice.startCameras()}`)
console.log(`GetFrame Code: ${myDevice.getFrame()}`)

let depthData = myDevice.getDepthData()

//get specs for the depth image (mode  = 1)
let specs = myDevice.getImageSpecs(1)

console.log(`Height: ${specs.height} | Width: ${specs.width} | Stride: ${specs.stride} | ISO: ${specs.iso} | timestamp: ${specs.timestamp} | whitebalance: ${specs.whitebalance}`)

myDevice.releaseImageAndCamera()
myDevice.stopCameras()

Functions:

Create Device Reference:

let myDevice = new kinect.AzureKinectDeviceWrapper(1)

Open Device: Returns status code. 0 == successful.

myDevice.openDevice()

Configure Depth Mode:

0 = K4A_DEPTH_MODE_OFF 1 = K4A_DEPTH_MODE_NFOV_2X2BINNED 2 = K4A_DEPTH_MODE_NFOV_UNBINNED 3 = K4A_DEPTH_MODE_WFOV_2X2BINNED 4 = K4A_DEPTH_MODE_WFOV_UNBINNED 5 = K4A_DEPTH_MODE_PASSIVE_IR

myDevice.configureDepthMode(1)

Configure Color Mode:

0 = K4A_IMAGE_FORMAT_COLOR_MJPG 1 = K4A_IMAGE_FORMAT_COLOR_NV12 2 = K4A_IMAGE_FORMAT_COLOR_YUY2 3 = K4A_IMAGE_FORMAT_COLOR_BGRA32 4 = K4A_IMAGE_FORMAT_DEPTH16 5 = K4A_IMAGE_FORMAT_IR16

myDevice.configureColorFormat(3)

Configure Color Resolution:

0 = K4A_COLOR_RESOLUTION_OFF 1 = K4A_COLOR_RESOLUTION_720P 2 = K4A_COLOR_RESOLUTION_1080P 3 = K4A_COLOR_RESOLUTION_1440P 4 = K4A_COLOR_RESOLUTION_1536P 5 = K4A_COLOR_RESOLUTION_2160P 6 = K4A_COLOR_RESOLUTION_3072P

myDevice.configureColorResolution(1)

Configure FPS:

5 = K4A_FRAMES_PER_SECOND_5 15 = K4A_FRAMES_PER_SECOND_15 30 = K4A_FRAMES_PER_SECOND_30

myDevice.configureFPS(15)

Start Cameras:

myDevice.startCameras()

Get Frame: assigns frame to private frame variable of device.

myDevice.getFrame()

Get Depth Data Array:

myDevice.getDepthData()

Get Color Data Array:

myDevice.getColorData()

Get IR Data Array:

myDevice.getIRData()

Get Point Cloud Data Array:

myDevice.getPointCloudData()

Get Object of Width/Height/ISO/StrideBytes/Timestamp/Whitebalance of Image:

1 = Specifications for Depth Image 2 = Specifications for Color Image 3 = Specifications for IR Image 4 = Specifications for Point Cloud Image

myDevice.getImageSpecs(int mode)

Release All Images(Color, Depth, IR, Point Cloud) and Camera References:

myDevice.releaseImageAndCamera()

Stop all Cameras:

myDevice.stopCameras()

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details