In this project simple color selective background extraction is done. Then the result is converted to binary. Resulting image is pre-processed by dilating and thus removing errors in detection. Contour is detected. We assume we have only one contour detected in image. If more than 1 is detected, image is cleared (text erased). Then centre of contour is found and used to plot line between current centre and previous centre and thus a continuous writing is made possible.
Update: Working on low illuminance (for Night Vision) operation of this Digital Pen.