UPLOAD DATA
...
Indepth theory
Calibrations
Calibrations Overview
3min
scenes with 2d and 3d data across various coordinate systems docid\ xqf6uaqsofwvavmtepdec need calibration to align sensors by location and orientation this includes projecting 3d points onto the camera’s image plane types of calibrations all calibrations detail a sensor’s 3d position and orientation relative to the reference system they also map 3d points to the camera’s image plane for lidar/radar, there is only one type of calibration available, lidar calibrations docid 4qwtbde2oxdchrgpxsze4 for cameras, we support different types of standard camera calibrations docid 0clkgytfe9bon5xu9zeal , where you only have to provide the intrinsic parameters of the camera unsupported camera model if your camera model is not supported, you can also provide a custom camera calibrations docid\ f jarczytv6cxwzc675zk where you provide the implementation in the form of a webassembly module how to create a calibration see this example of how to create a calibration for a lidar sensor and two camera sensors of type pinhole for other camera types as kannala, fisheye etc, see https //github com/annotell/kognic io examples python/tree/master/examples/calibration from kognic io client import kognicioclient from kognic io model import sensorcalibration from kognic io model calibration camera common import cameramatrix, distortioncoefficients from kognic io model calibration camera pinhole calibration import pinholecalibration from kognic io model calibration common import position, rotationquaternion from kognic io model calibration common import position, rotationquaternion from kognic io model calibration lidar lidar calibration import lidarcalibration, lidarfieldofview client = kognicioclient() \# create a sample calibration for lidar lidar position = position(x=0 0, y=0 0, z=0 0) lidar rotation = rotationquaternion(w=1 0, x=0 0, y=0 0, z=0 0) lidar fov = lidarfieldofview(start angle deg=315, stop angle deg=45, depth=200) lidar calibration = lidarcalibration(position=lidar position, rotation quaternion=lidar rotation, field of view=lidar fov) \# create a sample calibration for a pinhole camera for other camera types visit \# https //github com/annotell/kognic io examples python/tree/master/examples/calibration camera position = position(x=0 0, y=0 0, z=0 0) camera rotation = rotationquaternion(w=0 5, x= 0 5, y=0 5, z= 0 5) camera camera matrix = cameramatrix(fx=3450, fy=3250, cx=622, cy=400) camera distortion coefficients = distortioncoefficients(k1=0 0, k2=0 0, p1=0 0, p2=0 0, k3=1 0) pinhole calibration = pinholecalibration( position=camera position, rotation quaternion=camera rotation, camera matrix=camera camera matrix, distortion coefficients=camera distortion coefficients, image height=1080, image width=1920, field of view=190 0, ) sensor calibration = sensorcalibration( external id="create your own id here", # to make it easier for you to find the calibration later calibration={ \# the keys "lidar", "left front camera" etc, must match the \# names of the sensors in the scenes that use this calibration "lidar" lidar calibration, "left front camera" pinhole calibration, "right front camera" pinhole calibration } ) created calibration = client calibration create calibration(sensor calibration) print(f"created calibration with id {created calibration id}") reuse calibration note that after a calibration has been created you can, and should, reuse the same calibration for multiple scenes if possible, see below get calibrations existing calibrations can be fetched with the retrieved id or with the provided external id this can either be done via the client in python or via kognicutil # fetch calibration by external id client calibration get calibrations(external id="collection 2020 06 16") ```# fetch calibration by external id kognicutil calibration external id "collection 2020 06 16" ```