UPLOAD DATA
...
Calibrations
Standard Camera Calibrations
12 min
the camera calibration format is based on https //docs opencv org/3 4/d4/d94/tutorial camera calibration html format and this http //www robots ox ac uk/ cmei/articles/single viewpoint calib mei 07 pdf the different camera types supported are pinhole , fisheye , kannala , principalpointdist , and fusedcylindrical if your calibration model is not supported, you can also provide a docid\ f jarczytv6cxwzc675zk where you provide the implementation in the form of a webassembly module common all camera calibrations have the following attributes true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type pinhole the pinhole camera model expands the common model with true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type 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 def unity pinhole calibration() camera position = position(x=0 0, y=0 0, z=0 0) camera rotation = rotationquaternion(w=1 0, x=0 0, y=0 0, z=0 0) 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) return 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, ) fisheye the fisheye camera model expands the pinhole model with the following true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type from kognic io model calibration camera common import cameramatrix, distortioncoefficients from kognic io model calibration camera fisheye calibration import fisheyecalibration from kognic io model calibration common import position, rotationquaternion def unity fisheye calibration() camera position = position(x=0 0, y=0 0, z=0 0) camera rotation = rotationquaternion(w=1 0, x=0 0, y=0 0, z=0 0) 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=0 1) return fisheyecalibration( position=camera position, rotation quaternion=camera rotation, camera matrix=camera camera matrix, distortion coefficients=camera distortion coefficients, image height=1080, image width=1920, xi=123 456, field of view=190 0, ) kannala the kannala camera model changes and expands the pinhole with the following true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type from kognic io model calibration camera common import cameramatrix from kognic io model calibration camera kannala calibration import ( kannalacalibration, kannaladistortioncoefficients, undistortioncoefficients, ) from kognic io model calibration common import position, rotationquaternion def unity kannala calibration() camera position = position(x=0 0, y=0 0, z=0 0) # similar to lidar camera rotation = rotationquaternion(w=1 0, x=0 0, y=0 0, z=0 0) # similar to lidar camera camera matrix = cameramatrix(fx=3450, fy=3250, cx=622, cy=400) camera distortion coefficients = kannaladistortioncoefficients(k1=0 0, k2=0 0, p1=0 0, p2=0 0) camera undistortion coefficients = undistortioncoefficients(l1=0 0, l2=0 0, l3=0 0, l4=0 0) return kannalacalibration( position=camera position, rotation quaternion=camera rotation, camera matrix=camera camera matrix, distortion coefficients=camera distortion coefficients, undistortion coefficients=camera undistortion coefficients, image height=1080, image width=1920, field of view=180 0, ) principal point distortion the principal point distortion model consists of the common attributes plus true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type from kognic io model calibration camera common import cameramatrix from kognic io model calibration camera principal point distortion calibration import ( distortioncenter, lensprojectioncoefficients, principalpoint, principalpointdistortioncalibration, principalpointdistortioncoefficients, ) from kognic io model calibration common import position, rotationquaternion def unity principal point distortion calibration() camera position = position(x=0 0, y=0 0, z=0 0) camera rotation = rotationquaternion(w=1 0, x=0 0, y=0 0, z=0 0) camera camera matrix = cameramatrix(fx=3450, fy=3250, cx=622, cy=400) camera distortion coefficients = principalpointdistortioncoefficients(k1=0 0, k2=0 0) principal point = principalpoint(x=0 0, y=0 0) distortion center = distortioncenter(x=0 0, y=0 0) lens projection coefficients = lensprojectioncoefficients(c1=0 0, c2=0 0, c3=0 0, c4=0 0, c5=0 0, c6=0 0) return principalpointdistortioncalibration( position=camera position, rotation quaternion=camera rotation, camera matrix=camera camera matrix, principal point distortion coefficients=camera distortion coefficients, lens projection coefficients=lens projection coefficients, principal point=principal point, distortion center=distortion center, image height=1080, image width=1920, field of view=180 0, ) fused cylindrical the fused cylindrical model consists of the common attributes plus true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type from kognic io model calibration camera common import cameramatrix from kognic io model calibration camera fused cylindrical calibration import cutangles, fusedcylindricalcalibration from kognic io model calibration common import position, rotationquaternion def example fused cylindrical calibration() camera position = position(x=0 0, y=0 0, z=0 0) camera rotation = rotationquaternion(w=1 0, x=0 0, y=0 0, z=0 0) camera camera matrix = cameramatrix(fx=400, fy=400, cx=600, cy=450) cut angles degree = cutangles(upper= 40 0, lower=30 0) return fusedcylindricalcalibration( position=camera position, rotation quaternion=camera rotation, camera matrix=camera camera matrix, image height=1080, image width=1920, cut angles degree=cut angles degree, vertical fov degree=70, horizontal fov degree=90 0, max altitude angle degree=90 0, ) cylindrical the cylindrical model consists only of the common attributes there are no extra attributes to set for this model from kognic io model calibration camera common import cameramatrix from kognic io model calibration camera cylindrical calibration import cylindricalcalibration from kognic io model calibration common import position, rotationquaternion def example cylindrical calibration() camera position = position(x=0 0, y=0 0, z=0 0) camera rotation = rotationquaternion(w=1 0, x=0 0, y=0 0, z=0 0) camera camera matrix = cameramatrix(fx=400, fy=400, cx=600, cy=450) return cylindricalcalibration( position=camera position, rotation quaternion=camera rotation, camera matrix=camera camera matrix, image height=1080, image width=1920, ) principal point fisheye the principal point fisheye model consists of the common attributes plus true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type from kognic io model calibration camera common import cameramatrix from kognic io model calibration camera principal point fisheye calibration import ( principalpointfisheyecalibration, principalpointfisheyecoefficients, ) from kognic io model calibration common import position, rotationquaternion def unity principal point fisheye calibration() camera position = position(x=0 0, y=0 0, z=0 0) camera rotation = rotationquaternion(w=1 0, x=0 0, y=0 0, z=0 0) camera camera matrix = cameramatrix(fx=3450, fy=3250, cx=622, cy=400) principal point fisheye coefficients = principalpointfisheyecoefficients(alpha l=0 0, alpha r=0 0, beta u=0 0, beta l=0 0) return principalpointfisheyecalibration( position=camera position, rotation quaternion=camera rotation, camera matrix=camera camera matrix, principal point fisheye coefficients=principal point fisheye coefficients, image height=1080, image width=1920, field of view=180 0, )
