Edge detection library in js