Skip to content

JavaScript OpenCV 边缘检测

Published: at 11:01 AMSuggest Changes

解释

示例

使用

let src = cv.imread('canvasInput');
let dst = new cv.Mat();
cv.cvtColor(src, src, cv.COLOR_RGB2GRAY, 0);
// You can try more different parameters
cv.Canny(src, dst, 50, 100, 3, false);
cv.imshow('canvasOutput', dst);
src.delete(); dst.delete();

参考文章


Previous Post
使用 JavaScript 获取 PDF 页码
Next Post
JavaScript OpenCV Hough Transform 直线检测