-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
121f90c
commit 8b026b3
Showing
375 changed files
with
227,365 additions
and
9,657 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# These are supported funding model platforms | ||
|
||
custom: ["https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=NUZP3U3QZEQV2¤cy_code=EUR&source=url"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,120 @@ | ||
node_modules | ||
npm-debug.log | ||
Thumbs.db | ||
build/ | ||
.node_pre_gyprc | ||
.node_pre_gyprc | ||
.vscode/ | ||
|
||
# Ignore the downloaded SDK | ||
/sdk | ||
|
||
# Ignore the dll files in the root of this module and the examples folders and script folders | ||
/*.dll | ||
/*.onnx | ||
/examples/**/*.dll | ||
/examples/**/*.onnx | ||
/scripts/*.dll | ||
/scripts/*.onnx | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,46 @@ | ||
# Node-Kinect2 | ||
# Kinect2 Library for Node / Electron | ||
|
||
Nodejs library to access the kinect 2 data from the official MS SDK on Windows. | ||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=NUZP3U3QZEQV2¤cy_code=EUR&source=url) | ||
|
||
 | ||
This library enables you to use the Kinect v2 in your nodejs or electron apps. | ||
|
||
 | ||
|
||
Features: | ||
|
||
- get rgb camera feed | ||
- get depth feed | ||
- get ir feed | ||
- point cloud (greyscale and colored) | ||
- get skeleton joints (2d and 3d) | ||
- user masking | ||
|
||
## Installation | ||
|
||
You will need to install [the official Kinect 2 SDK](https://www.microsoft.com/en-us/download/details.aspx?id=44561) before you can use this module. | ||
|
||
### node.js | ||
Just npm install like you would do with any regular module. | ||
|
||
You need at least node version 0.12 to use this module. Older versions do not work. Just use npm install: | ||
|
||
``` bash | ||
npm install kinect2 | ||
``` | ||
$ npm install kinect2 | ||
``` | ||
|
||
### electron | ||
There are no precompiled binaries yet, so you need to have [node-gyp installed on your system](https://github.com/nodejs/node-gyp). | ||
|
||
If you want to use this module inside an electron application, you will need to [build this module for electron usage](https://github.com/atom/electron/blob/master/docs/tutorial/using-native-node-modules.md). I've provided a build script which does just that. | ||
## Examples | ||
|
||
You will need to have node-gyp & it's dependencies installed (https://github.com/nodejs/node-gyp) before you can continue. | ||
There are nodejs and electron examples in the examples/ folder of this repo. To run them, execute npm install and npm start: | ||
|
||
``` bash | ||
# cd into the directory of kinect2 | ||
cd node_modules\kinect2 | ||
# run my build script to create a native binary for electron | ||
npm run build:electron | ||
``` | ||
$ cd examples/electron | ||
$ npm install | ||
$ npm start | ||
``` | ||
|
||
## Usage | ||
The electron examples have the javascript code inside the html files. You can find these html files in [examples/electron/renderer/demos](examples/electron/renderer/demos). | ||
|
||
``` | ||
var Kinect2 = require('kinect2'); | ||
var kinect = new Kinect2(); | ||
if(kinect.open()) { | ||
console.log("Kinect Opened"); | ||
//listen for body frames | ||
kinect.on('bodyFrame', function(bodyFrame){ | ||
for(var i = 0; i < bodyFrame.bodies.length; i++) { | ||
if(bodyFrame.bodies[i].tracked) { | ||
console.log(bodyFrame.bodies[i]); | ||
} | ||
} | ||
}); | ||
//request body frames | ||
kinect.openBodyReader(); | ||
//close the kinect after 5 seconds | ||
setTimeout(function(){ | ||
kinect.close(); | ||
console.log("Kinect Closed"); | ||
}, 5000); | ||
} | ||
``` | ||
## Donate | ||
|
||
Like this library? Always welcome to buy me a beer 🍺 | ||
|
||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=NUZP3U3QZEQV2¤cy_code=EUR&source=url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.