16 def __init__(self, stream):
17 super().__init__(stream)
21 def setup(self, stream):
26 def tear_down(self, stream):
27 super().tear_down(stream)
31 def handle_async_stream(self, stream):
32 super().handle_async_stream(stream)
33 print(
"handle_async_stream")
36 def handle_async_wait_result(self, image, status):
37 super().handle_async_wait_result(image, status)
38 self.rate_counter.step()
39 print(
"New image: " + image.__class__.__name__ +
" " + str(image) +
" | Status: " + str(status) +
" | Buffer Index: " + str(image.buffer_index))
43 print(
"Acquired with: " + str(self.rate_counter.rate) +
" fps")
48 cvb.AcquisitionStack.Vin)
as device:
49 with MyStreamHandler(device.stream())
as handler:
Union[cvb.GenICamDevice, cvb.VinDevice, cvb.EmuDevice, cvb.VideoDevice, cvb.NonStreamingDevice] open(str provider, int acquisition_stack=cvb.AcquisitionStack.PreferVin)
Opens a device with the given provider and acquisition stack.
Definition: __init__.py:1629
Frame rate measurement counter with selectable averaging window.
Definition: __init__.py:5091
Handler object for a single stream.
Definition: __init__.py:5459
str install_path()
Directory Common Vision Blox has been installed to.
Definition: __init__.py:8318