Image edge detection
Edge detection is a fundamental tool in image processing, machine vision and computer vision. In this post we're going to take a look at a very basic edge detection algorithm, which takes into account a predefined tolerance value that can be adjusted to detect arbitrary fine details in a given image. # Algorithm The algorithm is extremely simple; it begins by iterating over each pixel in the image, then, for each pixel, it checks its neighbors. +-------+-------+-------+ | | | | | A | B | C | | | | | +-------+-------+-------+ | | | | | D | | E | | | | | +-------+-------+-------+ | | | | | F | G | H | | | | | +-------+-------+-------+ If any two opposite neighbors differ in intensity by more than a predefined tolerance, then it marks the current pixel as part of an edge. The comparison is done by taking th