image-js icon indicating copy to clipboard operation
image-js copied to clipboard

Support: Auto Canny detection

Open rishcool opened this issue 7 years ago • 2 comments

Hi,

I am using image.js for the image processing and detection edges of document for the OCR purpose but for that i require contour of the document, using auto canny algorithm i have used function in imagejs mean, for high threshold and low threshold, but no luck. can you help me out to get the mean of image for detecting edges or any other support to detect "auto canny edge detection" e.g. https://www.pyimagesearch.com/2015/04/06/zero-parameter-automatic-canny-edge-detection-with-python-and-opencv/

Thanks & Regards, Rishabh Trivedi

rishcool avatar May 19 '18 06:05 rishcool

It's in a separate lib - https://github.com/image-js/canny-edge-detector

Watch out for this issue tho https://github.com/image-js/canny-edge-detector/issues/2

steveliles avatar May 19 '18 08:05 steveliles

Hi Steveliles,

Thanks for the quick answer, I have checked this library but this is doing calculation via the default option as the values defined are fixed values as mentioned below and its not calculating via image median; default option is as below:

const defaultOptions = { lowThreshold: 10, highThreshold: 30, gaussianBlur: 1.1 };

I need to calculate lowThreshold and highThreshold values via image median.

rishcool avatar May 19 '18 15:05 rishcool