inspirit / jsfeat

JavaScript Computer Vision library.
MIT License
2.74k stars 374 forks source link

Get edges #66

Closed simonhochrein closed 7 years ago

simonhochrein commented 7 years ago

Hello, I was wondering if I could get the edges returned from canny so that I can draw a square around the object

Can jsfeat do that?

sminogue commented 7 years ago

Yes you can. Sorry I didnt see your question earlier... You probably figured it out by now on your own but for those who follow:

  1. Convert image to grey scale
  2. Perform Gaussian Blur
  3. Perform Canny Edge Detection
  4. Perform hough transform to get lines
  5. Celebrate

A quick and dirty example of what that all looks like: https://gist.github.com/sminogue/b20bc6c270e5784d781d3f719c81dec5

simonhochrein commented 7 years ago

Thanks