29 lines
1008 B
Python
29 lines
1008 B
Python
from core.oak_fcc3_client import OakFcc3Client
|
|
|
|
for frame_type in ["RAW_BRUTO", "RGB", "MULTISPEC"]:
|
|
print("\nTESTANDO:", frame_type)
|
|
|
|
with OakFcc3Client(
|
|
fps=15,
|
|
width=640,
|
|
height=400,
|
|
frame_type=frame_type,
|
|
output_dtype="float32",
|
|
capture_mode="AUTO",
|
|
raw_policy="allow_single",
|
|
sync_mode="best",
|
|
sync_tolerance_ms=25.0,
|
|
) as cam:
|
|
frame, meta, decoded = cam.get_next_decoded(timeout=2.0)
|
|
|
|
print("frame_type:", meta.get("frame_type"))
|
|
print("layout:", meta.get("output_layout"))
|
|
print("channels:", meta.get("channels"))
|
|
print("shape:", getattr(frame, "shape", None))
|
|
print("dtype:", getattr(frame, "dtype", None))
|
|
print("payload_sources:", meta.get("payload_sources"))
|
|
print("active_roles:", cam.get_status().get("active_roles"))
|
|
print("decoded_roles:", {
|
|
cam_id: item.get("role")
|
|
for cam_id, item in decoded.items()
|
|
}) |