def read(self):
		frame = None
		with self._capture_lock:
			frame = self._capture_frame
		# If there are problems, keep retrying until an image can be read.
		while frame == None:
			time.sleep(0)
			with self._capture_lock:
				frame = self._capture_frame
		# Save captured image for debugging.
		cv2.imwrite(config.DEBUG_IMAGE, frame)
		# Return the capture image data.
		return frame
Read a single frame from the camera and return the data as an OpenCV
dataset/ETHPy150Open tdicola/pi-facerec-box/webcam.py/OpenCVCapture.read