Update webcam.py

final function version