キャリブレーション概要
3 分
さまざまな docid 3jkwdhqcmvnvbuzbouzmr にまたがる2dおよび3dデータを含むシーンは、位置と向きによってセンサーを整合させるための キャリブレーション が必要です。これには3d点をカメラの画像平面に投影することも含まれます。 キャリブレーションのタイプ すべてのキャリブレーションは、参照システムに対するセンサーの3d位置と向きを詳細に示します。また、3d点をカメラの画像平面にマッピングします。 lidar/radarの場合、利用可能なキャリブレーションのタイプは1つのみです。 docid 6oyu1cilw9ebedsgrjd3f 。 カメラの場合、 docid\ wutszyygkev3haprbh 8 のさまざまなタイプをサポートしており、カメラの内部パラメータを指定するだけで使用できます。 お使いのカメラモデルがサポートされていない場合は、 docid\ hg1krvpudpihysj2cl1ho を使用することもできます。この場合、webassemblyモジュールの形式で実装を提供します。 キャリブレーションの作成方法 lidarセンサーとpinholeタイプの2つのカメラセンサーのキャリブレーションを作成する例を参照してください。 kannala、fisheye等の他のカメラタイプについては、 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}") キャリブレーションが作成されたら、可能な限り同じキャリブレーションを複数のシーンで再利用することができます。また、そうすることを推奨します。詳細は以下を参照してください。 キャリブレーションを取得する 既存のキャリブレーションは、取得したidまたは指定した外部idを使用して取得できます。これはpythonクライアントまたは 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" ```
