Edge detection in Javascript
I have a matrix (here's the plot: http://i.imgur.com/GNIWp.png) and I'd like find out, where the edges are.
Here's a picture of the same plot with lines which indicate 开发者_高级运维the edges: http://i.imgur.com/yffGh.png
Is there any algorithm to detect these edges?
There are plenty of fairly simple edge detection algorithms that aren't too hard to implement, such as the Canny edge detector. Bear in mind that a lot of these algorithms have different strengths and weaknesses, so I'd suggest you read up on the different approaches and decide based on what you're trying to do.
Alternatively, if you only want the functionality and aren't interested in actually implementing it, you can use the Pixtastic image processing library.
Also, possible duplicate question here (though that question is more to do with background removal).
精彩评论