node-librealsense2
is a node.js wrapper of the library working with Intel® RealSense™ depth cameras (D400 series and the SR300).
node.js and node-gyp need to be installed.
Obtain a Node.js
copy
Setup prerequisites for node-gyp
by running the following command in shell, make sure you're running it via "Run as Administrator
" menu:
npm install --global --production windows-build-tools
You will probably need to setup proxy of npm or https proxy of npm
You might need to manually fix Python (currently 2.7.xx) installation done by the command above, Run Python installer, choose "Change Python 2.7.xx
" and then make sure "Add python.exe to Path
" is checked. Click "Finish
" to do the fix.
Alternatively, you can read the offical installation guide
npm install -g node-gyp
Note: specify "-proxy=http://example.com:<port>
" if node-gyp failed to download file with name pattern "node-v*-headers.tar.gz
"
$ npm i --save node-librealsense2
git clone ...
cd wrappers/nodejs
npm install
$ cd wrappers/nodejs/examples
$ npm install
# Plugin the camera into you machine and run below commands to see if it works
$node nodejs-capture.js
HTML format documents are under wrappers/nodejs/doc which were generated by jsdoc.