Added webcam code.
Fixed a bug in webcam code.