Kinect Paint
- Posted: Jun 22, 2011 at 9:30 AM
- 5,718 Views
- 4 Comments
Kinect Paint
Kinect Paint is a skeleton tracking application that allows you to become the paint brush! This application uses the Kinect for Windows SDK and its skeletal tracking feature to create a painting experience. Use several different tools, a simple color palette, and create a masterpiece!
This paint sample allows you to paint on a canvas using a pen, paintbrush, airbrush, and eraser. It allows you to select different brush sizes and colors, and to save and load.
Use your right hand to control the cursor. Hover over a button for a second to press it.
To paint, hold your left hand up above your shoulder. If the Kinect is not plugged in when you start the app, it will use the mouse instead.
Project Information URL: http://channel9.msdn.com/coding4fun/projects/Kinect-Paint
Project Download URL: http://paint.codeplex.com/releases/view/68386
/// <summary>
/// Call to hide the UI and begin painting on the canvas
/// </summary>
public void StartPainting()
{
if (_isTutorialActive)
{
return;
}
// Make the cursor passive so buttons and stuff don't respond to it
PART_Cursor.Passive = true;
// Draw at the current position and start checking for updates until done
Point pos = PART_Cursor.GetPosition(PART_LoadedImageDisplay);
Draw(pos, pos, null);
_pastCursorPosition = pos;
if (NuiRuntime == null)
CompositionTarget.Rendering += ContinueDrawingStroke;
else
NuiRuntime.SkeletonFrameReady += ContinueDrawingStroke;
} /// <summary>
/// Call to show the UI and stop painting on the canvas
/// </summary>
public void StopPainting()
{
// Make the cursor active again
PART_Cursor.Passive = false;
_imageUnsaved = true;
// Stop listening for cursor changes
if (NuiRuntime == null)
CompositionTarget.Rendering -= ContinueDrawingStroke;
else
NuiRuntime.SkeletonFrameReady -= ContinueDrawingStroke;
} Contact Information:
- Blog: Laurent Bugnion (GalaSoft) (http://blog.galasoft.ch/)
- Twitter: @LBugnion
- Twitter: @EvanLangIM
Comments Closed
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
This application has a very good interface and very precise mouse control. Looks like the ui has been inspired by the tiles of the next windows/phone7. Great work!
As I am interested in programming my own application for kincet I wonder if you could publish your code. Especially the mouse control would be very useful for many kinect developers.
Thanks :)
@stefan george: Check out the Source tab on the Project download page (or click here http://paint.codeplex.com/SourceControl/list/changesets). The source is all there...
Great thank you :)
Whoa Fun!
Remove this comment
Remove this thread
close