def startCamera(self): self.camera = None try: self.camera = Device(max(self.getCameraDeviceNum(), 0)) except Exception as e: self.messageQ.put(('camera', 'Error: {}'.format(e))) return False #self.camera.set_resolution( 640, 480 ) self.messageQ.put( ('camera', 'Successfully Connected: Device: {}'.format( self.getCameraDeviceNum()))) return True
def startCamera(self): self.camera = None try: self.camera = Device(max(self.getCameraDeviceNum(), 0)) except Exception as e: self.messageQ.put(('camera', 'Error: {}'.format(e))) return False try: self.camera.set_resolution(*self.getCameraResolution()) self.messageQ.put( ('camera', '{}x{} Supported'.format(*self.getCameraResolution()))) except Exception as e: self.messageQ.put(('camera', '{}x{} Unsupported Resolution'.format( *self.getCameraResolution()))) self.messageQ.put( ('camera', 'Successfully Connected: Device: {}'.format( self.getCameraDeviceNum()))) return True