Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Chroma key webcam

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
9,312
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 4, 2008

Developing real time chroma key software.
Download available at:
http://ehci.googlecode.com/files/background-windows-exe-1.0.zip
Works like this:

First, select some color, like, white, which would be in RGB = (255,255,255).

Then, define some distance threshold, like, 20.

And then, for every pixel in the image, calculate the euclidean distance from the white color... let's say you have this pixel (250, 249, 248). The euclidean distance would the the square of (255-250)^2 + (255-249)^2 +(255-248)^2 = 10,48. As this is lower than the threshold, it looks like this color is near white, so, this should be considered a background pixel. In case it's far from the white, like (30, 40, 50), this is part of the image, and then we would not put the background there.

The final step is simple. Replace all colors near white with the background picture.

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (dannyxyz22)

  • Oh yea and in stdout (.txt) I get: 3 pixels the escape button was pressed! Also what is the stderr.

  • @Saiyan3775 So, what is written in stderr? Thx

  • like where is the video capture button?

  • @Saiyan3775 It should automatically start at fullscreen and capturing. Isn't it happening? What do you get in stdout? And stderr?

    Make sure your camera is working using some standard video capture software you already have.

    Thanks

  • @dannyxyz22 Nope that's not happening .My camera (webcam) is fine. All i know is that the webcam program you made closes automatically if i press any button and then a file that wasn't there before disappears.

  • @Saiyan3775 Well, this application relies on OpenCV for webcam access. Can you download, install and run some opencv samples? This will make sure webcam access is working. Thank you!

see all

All Comments (30)

Sign In or Sign Up now to post a comment!
  • @dannyxyz22 I no got no stderr file, could it be the file that pops up and disaapperin?

  • please need answer super sooooon! I suscribed!!!!!!!!!!!!!

  • @Saiyan3775 What do you mean by start the videoing at fullscreen?

  • hope someone answers this ? How do you start the videoing at fullscreen? May sound stupid sorry XD

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more