Implementation

Canny Edge Detection

Edge detection is the most important defining aspect of our app that separates it from any other coloring book app on the market. This is not a feature that has widely appeared in other coloring book applications. To implement edge detection we decided to use canny edge detection. Canny edge detection works as follows and is comprised of five different steps:

  • Step 1:
    • Apply Gaussian Blur filter to remove the noise.
  • Step 2:
    • Use four edge detection filters such as Sobel to detect horizontal, vertical, and diagonal edges.
  • Step 3:
    • Then we apply non-maximum suppression to thin the edges.
  • Step 4:
    • Set a high and low threshold. If a pixel value is above the threshold value it is counted as a strong edge. If it is in between the two thresholds then it will be considered a weak edge. If it is below the low threshold it will not be considered an edge.
    • These two thresholds are the inputs to the Canny Edge Detection filter.
  • Step 5:
    • The final image edges are determined using hysteresis. Hysteresis helps us decide which of the weak edges will be considered for the final result. Strong edges are automatically counted as edges.

Future Additions

  • Implement zoom-in feature for better precision while coloring
  • Make user customizable color palettes - currently, all of the colors are hard-coded in
  • Add textures to the drawing tool (pencil, brush, etc.)
  • User determined edge thickness
  • Undo functionality

List of all APIs used

  • OpenCV
    • Image processing and filtering
  • Google Drive
    • Loading images from Google Drive