https://codingchallenges.fyi/challenges/challenge-ocr
- Blur detection algorithms considered: box, gaussian and median
- Gaussian Blur performs the best and gives very natural boundaries later with edge detection. Possibly due to the way images are clicked as well, the center of attention pixel is sharper while blurring out pixels as we move away.
- Use kernel to get x & y direction magnitudes
- Take root of sum of squares to get magnitude
- Take arctan2 to get the angle
- Thin out the edges by suppressing now local maxima (done by comapring with the 2 neighbours in the appropriate directions)
- Local maxima in the gradient direction are kept
- Classify edges to strong, weak or non-edges
- Strong Edge is set to white(255), weak to gray(1) and non-edge to black(0)
- Weak edges connected to strong edges are checked
- Weak edges with connection are kept