import time
import os
import cvb
def __init__(self, stream):
super().__init__(stream)
def setup(self, stream):
super().setup(stream)
print("setup")
def tear_down(self, stream):
super().tear_down(stream)
print("tear_down")
def handle_async_stream(self, stream):
super().handle_async_stream(stream)
print("handle_async_stream")
def handle_async_wait_result(self, image, status):
super().handle_async_wait_result(image, status)
self.rate_counter.step()
print("New image: " + image.__class__.__name__ + " " + str(image) + " | Status: " + str(status) + " | Buffer Index: " + str(image.buffer_index))
def eval(self):
print("Acquired with: " + str(self.rate_counter.rate) + " fps")
cvb.AcquisitionStack.Vin) as device:
with MyStreamHandler(device.stream()) as handler:
handler.run()
time.sleep(10)
handler.finish()
Union[cvb.GenICamDevice, cvb.VinDevice, cvb.EmuDevice, cvb.VideoDevice, cvb.NonStreamingDevice] open(str provider, int acquisition_stack=cvb.AcquisitionStack.PreferVin)