Cameras
2 min
since kognic io 2 5 0 we are promoting our newer scene model, which does not expose scene types ( cameras ) and simplifies creation of any scene from a single model we recommend adopting it if possible, but note that it creates single frame sequences that may be incompatible with existing requests that require cameras scenes a cameras consists of a single frame of camera images, where the frame can contain between 1 12 images from different sensors for more documentation on what each field corresponds to in the cameras object please check the section related to scene overview docid\ yunpnpwuhzlgg9wb9qnk8 from future import absolute import from pathlib import path from typing import optional from uuid import uuid4 import kognic io model scene cameras as cm from kognic io client import kognicioclient from kognic io logger import setup logging from kognic io model import createsceneresponse, image base dir = path( file ) parent absolute() def run(client kognicioclient, dryrun bool = true, kwargs) > optional\[createsceneresponse] print("creating cameras scene ") metadata = {"location lat" 27 986065, "location long" 86 922623, "vehicle id" "abg"} scene = cm cameras( external id=f"cameras example {uuid4()}", frame=cm frame( images=\[ image( filename=str(base dir) + "/resources/img rfc01 jpg", sensor name="rfc01", ), image( filename=str(base dir) + "/resources/img rfc02 jpg", sensor name="rfc02", ), ] ), metadata=metadata, ) \# create scene return client cameras create(scene, dryrun=dryrun, kwargs) if name == " main " setup logging(level="info") client = kognicioclient() \# project available via `client project get projects()` project = "project identifier" run(client, project=project) use dryrun to validate scene setting dryrun parameter to true in the method call, will validate the scene using the api but not create it

