10 self._cam = cv.CreateCameraCapture(0)
13 im = cv.QueryFrame(self._cam)
14 # Add the line below if you need it (Ubuntu 8.04+)
16 #convert Ipl image to PIL image
17 return Image.fromstring("RGB", cv.GetSize(im), im.tostring())
20 elif os.name in ('ce', 'nt', 'dos'):
22 from VideoCapture import Device
24 # TODO exception handling
28 self._cam.setResolution(640, 480)
31 self._cam.saveSnapshot('image.jpg', quality=100)