{"id":26784475,"url":"https://github.com/image-js/canny-edge-detector","last_synced_at":"2025-04-19T16:51:44.535Z","repository":{"id":57193633,"uuid":"81007790","full_name":"image-js/canny-edge-detector","owner":"image-js","description":"JavaScript implementation of the Canny edge detector","archived":false,"fork":false,"pushed_at":"2018-07-10T06:38:31.000Z","size":337,"stargazers_count":37,"open_issues_count":1,"forks_count":5,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-29T10:32:06.857Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/image-js.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-05T17:10:45.000Z","updated_at":"2025-03-10T09:24:07.000Z","dependencies_parsed_at":"2022-09-15T22:31:18.354Z","dependency_job_id":null,"html_url":"https://github.com/image-js/canny-edge-detector","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/image-js%2Fcanny-edge-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/image-js%2Fcanny-edge-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/image-js%2Fcanny-edge-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/image-js%2Fcanny-edge-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/image-js","download_url":"https://codeload.github.com/image-js/canny-edge-detector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249742318,"owners_count":21318895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-29T10:28:48.131Z","updated_at":"2025-04-19T16:51:44.510Z","avatar_url":"https://github.com/image-js.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# canny-edge-detector\n\n  [![NPM version][npm-image]][npm-url]\n  [![build status][travis-image]][travis-url]\n  [![npm download][download-image]][download-url]\n\nCanny edge detector\n\n## Installation\n\n`$ npm install canny-edge-detector image-js`\n\n## Usage\n\n### cannyEdgeDetector(image[, options])\n\nFind edges in an image using the [Canny algorithm](https://en.wikipedia.org/wiki/Canny_edge_detector).  \nReturns a greyscale image with the edges at `options.brightness` value.\n\n__arguments__\n\n* `image` - a greyscale Image\n* `options` - an optional object\n\n__options__\n\n* `lowThreshold`: Low threshold for the hysteresis procedure (default: 10).\n* `highThreshold`: High threshold for the hysteresis procedure (default: 30).\n* `gaussianBlur`: Sigma parameter for the gaussian filter step (default: 1.1).\n* `brightness`: Values assigned to each edge pixel on the result image (default: image.maxValue).\n\n## Example\n```js\nconst cannyEdgeDetector = require('canny-edge-detector');\nconst Image = require('image-js').Image;\n\nImage.load('my-image.png').then((img) =\u003e {\n  const grey = img.grey();\n  const edge = cannyEdgeDetector(grey);\n  return edge.save('edge.png');\n})\n```\n\n## License\n\n[MIT](./LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/canny-edge-detector.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/canny-edge-detector\n[travis-image]: https://img.shields.io/travis/image-js/canny-edge-detector/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/image-js/canny-edge-detector\n[download-image]: https://img.shields.io/npm/dm/canny-edge-detector.svg?style=flat-square\n[download-url]: https://npmjs.org/package/canny-edge-detector\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimage-js%2Fcanny-edge-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimage-js%2Fcanny-edge-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimage-js%2Fcanny-edge-detector/lists"}