File Exchange

image thumbnail

Virtual Painting

version (3.1 KB) by Arindam Bose
Paint only using your finger tips to the computer screen and do many things with user friendly GUI.


Updated 29 Mar 2013

View License

This program detects user's finger's position by red color recognition and paint in a white space. The default color is blue. Color can be changed to any color. A basic GUI is made to save the picture in JPG, PNG and BMP format.

Cite As

Arindam Bose (2021). Virtual Painting (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (16)

iram khan

Linh Nguyen

I can't play, it don't display camera, how I draw by finger ??
Plz support, email :

ibrahim ATLI

wonderful program
wonderful programer


Zihang Wei

Suhas Yelluru

Can someone help me understand how this works? I'm trying to use the intermediate output and map it onto something else, so finding and tracking the finger and the position of the finger is what I'm interested in.
I'm not a veteran in MATLAB, as a result this naive question.




Hi, awesome code,
but I'm getting this error..

??? The class "imaq" is undefined.
Perhaps Java is not running.

Error in ==> DrawMe at 49
vidDevice = imaq.VideoDevice('winvideo', 1, 'YUY2_640x480', ...

how do I solve this?
Please help, I'm new to MATLAB

Ale Marco

you got idea how to do it?

Ale Marco

yes, I saw the video, but I want to paint on the video window "Final Video" and then erase it as video:

Arindam Bose

@ Ale Marco: watch this video:

Ale Marco

Hi! How i can create a virtual painting based on your code? Please help me.
Looks like this:


Arindam Bose

Guys, who are downloading the submission, if you like it, please comment or star it.

Arindam Bose

Watch Video Tutorial here:


Ohhh, Thanks a ton...

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!