Test code for taking photos with webcam