Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions tests/imx500.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,22 @@

imx500 = IMX500(model_path)

# Test getting the device ID.
device_id = imx500.get_device_id()
print("Device ID:", device_id)
if not device_id:
print("ERROR: empty device ID")

# Start the camera and capture some frames with output tensors.
picam2 = Picamera2(imx500.camera_num)
config = picam2.create_preview_configuration(buffer_count=12)
picam2.configure(config)
picam2.start()

# 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")
picam2.stop()
picam2.close()
exit()

NUM_FRAMES = 30

tensor_count = 0
Expand Down
Loading