Skip to content

virtual drawing pad with the help of OpenCV-Python. Further joined with letter and number prediction to make handwriting recognition

Notifications You must be signed in to change notification settings

saum7800/virtual-drawing-pad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

virtual-drawing-pad

This project was to understand the concepts of thresholding, contours and various smoothing functions performed on images. The drawing pad works with any red colour objects and points will be plotted at the centroid of that object. The drawing pad has been implemented in two ways:

1. Centroid of contour

  1. threshold the HSV (for adapting to different lighting conditions) converted image to find the red portions of image.
  2. detect the contours in the image and consider the one with largest area to be required contour.
  3. plot line from centroid of previous contour to the centroid of current contour.

2. Mean of white-mass

  1. threshold the HSV (for adapting to different lighting conditions) converted image to find the red portions of image.
  2. take mean of all the x-coordinates and the y-coordinates that are white in the thresholded image. This will give us the mean position at which we have to plot the point.
  3. plot line from previous such point to current point.

To use the program, press s to toggle drawing(initially off) and press e to toggle erasing(initially off). To save image and quit, press q.

This blogpost really helped with the Centroid-of-contour method.

About

virtual drawing pad with the help of OpenCV-Python. Further joined with letter and number prediction to make handwriting recognition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages