Socket
Book a DemoInstallSign in
Socket

to-grayscale

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-grayscale

Take an RGB buffer with specified depth and turn it into a grayscale one

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

to-grayscale

Take an RGB buffer with specified depth and turn it into a grayscale one.

Installation

npm install to-grayscale

Usage

v4l2camera example:

var fs = require('fs');
var v4l2camera = require('v4l2camera');
var toGrayscale = require('to-grayscale');

var cam = v4l2camera.Camera('/dev/video0');
cam.configSet({ width: 1280, height: 720 });
cam.start();

cam.capture(function () {
  var rgb = cam.toRGB();
  var grayscale = toGrayscale(new Buffer(rgb));

  fs.writeFile('camera.gray', grayscale);
});

Keywords

rgb

FAQs

Package last updated on 13 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts