21execute_with_mock =
True if sys.argv[1] ==
'--mock' else False
22flags = cvb.DiscoverFlags.IgnoreVins
24 flags |= cvb.DiscoverFlags.IncludeMockTL
27if len(deviceInfoList) < 1:
28 print(
"No devices found.")
31access_token = deviceInfoList[0].access_token
34 for info
in deviceInfoList:
35 if info.access_token.find(
'MockTL'):
37 access_token = info.access_token
40 print(
"Could not find CVMockTL.")
44 streams = [device.stream(
cvb.ImageStream, i)
for i
in range(device.stream_count)]
45 print(f
"Stream Count: {len(streams)}")
46 for stream
in streams:
48 for stream
in streams:
50 for image_index
in range(10):
51 for stream_index, stream
in enumerate(streams):
52 image, status, nodes = stream.wait()
57 print(f
"Stream #{stream_index}, "
58 f
"Image #{str(image_index)}, "
59 f
"Width: {image.width}, "
60 f
"Height: {image.height}")
61 for stream
in streams:
63 for stream
in streams:
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
List[cvb.DiscoveryInformation] discover_from_root(int flags=cvb.DiscoverFlags.FindAll, int time_span=300)
Discovers available devices / nodes depending on the given flags.
Definition: __init__.py:1609
The image stream class.
Definition: __init__.py:2521