Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

canny-edge-detector

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

canny-edge-detector

Canny edge detector

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
decreased by-8.72%
Maintainers
1
Weekly downloads
 
Created
Source

canny-edge-detector

NPM version build status npm download

Canny edge detector

Installation

$ npm install canny-edge-detector

Usage

cannyEdgeDetector(image[, options])

Find edges in an image using the Canny algorithm.
Returns a greyscale image with the edges at options.brightness value.

arguments

  • image - a greyscale Image
  • options - an optional object

options

  • lowThreshold: Low threshold for the hysteresis procedure (default: 10).
  • highThreshold: High threshold for the hysteresis procedure (default: 30).
  • gaussianBlur: Sigma parameter for the gaussian filter step (default: 1.1).
  • brightness: Values assigned to each edge pixel on the result image (default: image.maxValue).

Example

import cannyEdgeDetector from 'canny-edge-detector';
import Image from 'image-js';

Image.load('my-image.png').then((img) => {
  const grey = img.grey();
  const edge = cannyEdgeDetector(grey);
  return edge.save('edge.png');
})

License

MIT

Keywords

FAQs

Package last updated on 28 Jun 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc