buffer.bufPtr[:14]) stop_signal = yield MetadataArray( buffer.as_array(), metadata={ "counter": counter, "timestamp": dt }, ) else: stop_signal = yield buffer.as_array() count += 1 pf.PCO_AddBufferEx(self.handle, 0, 0, buffer.bufNr, XResAct, YResAct, 16) else: break if stop_signal: break if stop_signal: break finally: pf.PCO_SetRecordingState(self.handle, False) pf.PCO_CancelImages(self.handle) if stop_signal: yield True if __name__ == "__main__": h = pf.PCO_OpenCameraEx("USB 3.0", 0) pf.PCO_GetInfoString(h) pf.PCO_CloseCamera(h)
def close(self): pf.PCO_CloseCamera(self.handle) self.handle = None print("Connection to camera closed.")
def close(self): """This method closes the connection to the camera. """ pf.PCO_CloseCamera(self.handle) self.handle = None print("Connection to camera closed.")