topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 6:28 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Webcam Signature 1.0 - My Submission for the DC Programming Contest  (Read 37656 times)

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
http://www.youtube.com/v/AAUSaHYPdXU&hl=en

http://webcamsignature.wikidot.com

What Webcam Signature Does
Ever had a document on your computer that required your signature before sending it back to someone? Well, Webcam Signature allows you to write your name on your computer by using your webcam and a pen! No drawing tablets/cameras/scanners required.

Benefits of Using Webcam Signature
Natural: It is much more natural to write your name using a pen than a mouse.
Smooth: Your signature comes out smooth, unlike when you use MS Paint to draw something. It won't look like you visited Jittery Joe's!
Convenience: Allows you to write your name on your computer by just using your webcam and a pen! Capture signatures anywhere.
Reusable: Save your signature to an image for future use. Or, save the data points of your signature for future manipulation.
Simple: A very clean interface that is easy to use and takes no time to learn.
Versatile: In a pinch, you can use Webcam Signature to draw diagrams. Useful if you are taking classes and take notes with a laptop.

How to Use Webcam Signature
With the program opened, hold down either the CTRL or SHIFT key and then proceed to write your name in front of the webcam. Release the key you are holding down to stop writing. Press the CTRL or SHIFT key again to start writing again.
Copy your signature to the clipboard or save it to file to further manipulate it in a drawing program.
Save the data points of your signature so that you can retrieve it in the future to apply different colors and line sizes.

How Webcam Signature Works
Webcam Signature tracks the colors seen from your webcam to determine where your pen is. To obtain good results, the color of your pen should not be similar to the colors of your background. You can adjust what range of colors Webcam Signature tracks from within the program.

Compare for Yourself
On the left is a signature created using Webcam Signature and on the right is the same signature created using a mouse and MS Paint. Notice that the Webcam Signature output is much smoother and looks more natural whereas the one created in MS Paint is all jagged and looks like you have an unsteady hand. If you are signing documents for a client, it would not make a good impression to use the signature created in MS Paint. The difference is even more pronounced when you use thinner line sizes.

JohnDoeScreen.JPGWebcam Signature 1.0 - My Submission for the DC Programming Contest1

Paint.JPGWebcam Signature 1.0 - My Submission for the DC Programming Contest2


The source code will be send to mouser and veign after some people check it out to make sure it is working properly.
Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com
« Last Edit: June 25, 2008, 12:31 PM by VideoInPicture »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member


This is such a fun cool idea.. I expect it has to be very hard to get this to work accurately and might require a bit of tweaking, but it's just so cool.

I haven't even connected my webcam to this pc, but i'm going to now just to try this out.  :Thmbsup: :Thmbsup:

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Everyone make sure you see the youtube video eric linked at top of his post.

Veign

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 993
    • View Profile
    • Veign - Where design meets development
    • Donate to Member
Very interesting...

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member


This is such a fun cool idea.. I expect it has to be very hard to get this to work accurately and might require a bit of tweaking, but it's just so cool.

I haven't even connected my webcam to this pc, but i'm going to now just to try this out.  :Thmbsup: :Thmbsup:

Thanks, I was originally creating a hands based webcam mouse program but it didn't work to my satisfaction so I made this program instead. I'm just surprised no one has done this yet. I searched google and didn't see anything similar.

My goal is to eventually morph Webcam Signature into a no-holds bar hands based webcam mouse.

It doesn't take much work to make the program track accurately. For starters, I recommend you read the Help & FAQ on my web site. For the first time use, just grab a RED bic pen with a RED cap so you don't have to change any settings. Make sure you don't have too much red in your background.
Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com
« Last Edit: June 22, 2008, 05:34 PM by VideoInPicture »

Veign

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 993
    • View Profile
    • Veign - Where design meets development
    • Donate to Member
This could turn into a great application for someone with a disability where they have limited use of their hands but want to navigate around the internet.  Kinda of like Mouse Gestures (https://addons.mozil...-US/firefox/addon/39) but using the web cam instead.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
I think a good feature would be let person press a button to take a snapshot of the webcam image, and then select a point or two in the image that defines the color to track.  would be easier and more accurate than trying to guess your pen color.

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
I think a good feature would be let person press a button to take a snapshot of the webcam image, and then select a point or two in the image that defines the color to track.  would be easier and more accurate than trying to guess your pen color.

I thought of that but my goal for the 1.0 release was just to make sure it works properly. It took a good deal of tweaking to ensure the program actually ran in real time because it is so computationally intensive. I will add that in for the 2.0 release.

As a note, the two colored squares in the lower left of the window represents the brightest and darkest red/blue/green color the program will track.
Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
one thing im noticing is that the far right and left of webcam image dont map to far right and left of drawing surface -- it might be nice if that were the case.

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
This could turn into a great application for someone with a disability where they have limited use of their hands but want to navigate around the internet.  Kinda of like Mouse Gestures (https://addons.mozil...-US/firefox/addon/39) but using the web cam instead.

With the Webcam Mouse program I was creating, I was stuck on was how to do all the clicks and scroll that a mouse could do with just your hands and not a whole bunch of cryptic coding. Mouse gestures may work for it but wouldn't there be a lot of false clicks and scrolls and I'm just moving my mouse around?
Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com

Veign

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 993
    • View Profile
    • Veign - Where design meets development
    • Donate to Member
Mouse gestures may work for it but wouldn't there be a lot of false clicks and scrolls and I'm just moving my mouse around?
-VideoInPicture (June 22, 2008, 05:46 PM)

That's the difficulty to figure out  :)   You could do something very similar to what you are doing now where a key press is required to activate.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
I think one important thing to note is that now that you've got this basic program skeleton which watches webcam and creates images based on tracking info etc., there are probably a lot of really interesting other programs you could write based on this code.. my mind is swimming with possibilities..  things that dont require perhaps such accurate fine detail tracking.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
With the Webcam Mouse program I was creating, I was stuck on was how to do all the clicks and scroll that a mouse could do with just your hands and not a whole bunch of cryptic coding. Mouse gestures may work for it but wouldn't there be a lot of false clicks and scrolls and I'm just moving my mouse around?

you could always use audio input so user could use voice commands :)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
pretty amazing i'd say when you think of where it might lead.

i'd say, refine it a bit, think of the 'killer application' and then patent that.

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
one thing im noticing is that the far right and left of webcam image dont map to far right and left of drawing surface -- it might be nice if that were the case.

On my computer with the settings I'm using, I can get the signature to write to all the edges but it is a bit finicky. This is due to a combination of the tweaks used to speed the program up (the program doesn't actually look at every pixel because that takes too much CPU time) and how the program determines exactly what point to put the program drawing square at (average of all the valid colored pixels). This will take some tweaking to make it work well around the edges or I could just shrink the visible drawing surface.
Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
pretty amazing i'd say when you think of where it might lead.

i'd say, refine it a bit, think of the 'killer application' and then patent that.

Yeah, I will definitely be developing this program further. And I'm making it open source after the DC Programming Contest closes so I won't be patenting anything. Although, I would settle for a programming job (I'm a mechanical engineering university student).
Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
After playing around with Webcam Signature 1.0, I've got an idea that should greatly enhance the ability of the program to track the pen and filter out background colors. I'm going to try to code it in time for the contest closing. I've just got to plan it out and think it through so I'll know if it'll work. It might take too much processing power. We'll see if it works or not.
Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
Webcam Signature Works Really Well with a Flashlight!
« Reply #17 on: June 23, 2008, 04:06 AM »
I just realized that Webcam Signature works REALLY well with a flashlight in place of a colored pen. If you are having trouble getting Webcam Signature to track accurately, you should definitely try using a flashlight:

flashlightscreenshot.JPGWebcam Signature 1.0 - My Submission for the DC Programming Contest1

Instructions are on my Help & FAQ page at http://webcamsignatu...wikidot.com/help-faq. Essentially, you just making the tracking color bright white and the program will track a bright light source.

There is also a video of me using Webcam Signature with a flashlight at http://webcamsignatu...om/screenshots-video.

Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com
« Last Edit: June 25, 2008, 12:30 PM by VideoInPicture »

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
Alrighty,
I have made some improvements to Webcam Signature and the newest version is now 1.1. The primary thing is that I added the capability to select the tracking color by just clicking on a point on an image from the webcam. The greatly simplifies selecting the tracking color. I have also added the capability to statically or dynamically filter out the background for greater robustness. Get the latest version for testing at http://webcamsignatu...oad-webcam-signature

I have sent the source code to mouser if anyone needs it. The source code and the program are open source under a GNU General Public License V3 and I'll post it on the website in a few days.

FineTuneTC.JPGWebcam Signature 1.0 - My Submission for the DC Programming Contest1
FineTuneTCFiltered.JPGWebcam Signature 1.0 - My Submission for the DC Programming Contest2
Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com
« Last Edit: June 25, 2008, 12:30 PM by VideoInPicture »

wreckedcarzz

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,626
    • View Profile
    • Donate to Member
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:

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
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)

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.
Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
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

  • Member
  • Joined in 2006
  • **
  • Posts: 753
    • View Profile
    • Just Plain Super
    • Read more about this member.
    • Donate to Member
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%!
[Insert really cool signature here]

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
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)



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.
Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com

VideoInPicture

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
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%!

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?
Author of Circle Dock: http://circledock.wikidot.com
Author of Video In Picture: http://videoinpicture.wikidot.com
Author of Webcam Signature: http://webcamsignature.wikidot.com
Author of Easy Unicode Paster: http://easyunicodepaster.wikidot.com