We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94963a7 commit 08dc417Copy full SHA for 08dc417
1 file changed
tests/imx500.py
@@ -20,18 +20,22 @@
20
21
imx500 = IMX500(model_path)
22
23
-# Test getting the device ID.
24
-device_id = imx500.get_device_id()
25
-print("Device ID:", device_id)
26
-if not device_id:
27
- print("ERROR: empty device ID")
28
-
29
# Start the camera and capture some frames with output tensors.
30
picam2 = Picamera2(imx500.camera_num)
31
config = picam2.create_preview_configuration(buffer_count=12)
32
picam2.configure(config)
33
picam2.start()
34
+# wait for the device to be streaming before reading id.
+picam2.capture_metadata()
+device_id = imx500.get_device_id()
+print("Device ID:", device_id)
+if not device_id:
+ print("ERROR: empty device ID")
35
+ picam2.stop()
36
+ picam2.close()
37
+ exit()
38
+
39
NUM_FRAMES = 30
40
41
tensor_count = 0
0 commit comments