Main Area and Open Discussion > General Software Discussion
Webcam Signature 1.0 - My Submission for the DC Programming Contest
VideoInPicture:
So you can "write" and "draw" using a webcam and (mostly) any ordinary object? One of the coolest things I have seen using a webcam. Very interesting. :Thmbsup:
-wreckedcarzz (June 24, 2008, 10:30 PM)
--- End quote ---
Yep, you can use any object that has a color not in the background. I have been able to make the program track the color of my hand if I wear long sleeves!
Right now, I'm adding the ability for you to just draw with the mouse because you may not always have a webcam available. However, with the way I am implementing the control from the mouse, the signatures come out almost as smooth as using a pen and the webcam. The signatures you can create are top notch and much better than you can create in many painting programs without spending hours.
mouser:
I'm getting an unhandled exception when i choose "grab a frame":
"Object reference not set to an instance of an object"
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Drawing.Bitmap..ctor(Image original)
at SampleGrabberNET.UnsafeBitmap..ctor(Bitmap bitmapRef)
at WebCam_Signature.MainForm.GetFullFrameBitmap()
at WebCam_Signature.FineTuneTrackColorsForm.GrabAFrameButton_MouseClick(Object sender, MouseEventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
nite_monkey:
For a while, I couldn't get it to work, but then I used one of those green usb to ps/2 converters that comes with usb mice, and it works 100%!
VideoInPicture:
I'm getting an unhandled exception when i choose "grab a frame":
"Object reference not set to an instance of an object"
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Drawing.Bitmap..ctor(Image original)
at SampleGrabberNET.UnsafeBitmap..ctor(Bitmap bitmapRef)
at WebCam_Signature.MainForm.GetFullFrameBitmap()
at WebCam_Signature.FineTuneTrackColorsForm.GrabAFrameButton_MouseClick(Object sender, MouseEventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-mouser (June 25, 2008, 04:13 PM)
--- End quote ---
Is your webcam turned on? I didn't realize that the program would throw an exception when the webcam is not available and you try to go into "Fine Tune Tracking Color". I will fix that in a bit. You can safely press the continue button if that pops up.
VideoInPicture:
For a while, I couldn't get it to work, but then I used one of those green usb to ps/2 converters that comes with usb mice, and it works 100%!
-nite_monkey (June 25, 2008, 04:28 PM)
--- End quote ---
For your webcam? In the program, I'm using a DirectX wrapper to connect to the webcam. Maybe your webcam has an issue with DirectX?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version