import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; /** Camera calibration parameters */ export interface CameraCalibration { $type: "foxglove.CameraCalibration"; /** Timestamp of calibration data */ timestamp: Date | undefined; /** Frame of reference for the camera. The origin of the frame is the optical center of the camera. +x points to the right in the image, +y points down, and +z points into the plane of the image. */ frameId: string; /** Image width */ width: number; /** Image height */ height: number; /** * Name of distortion model * * Supported parameters: `plumb_bob` (k1, k2, p1, p2, k3) and `rational_polynomial` (k1, k2, p1, p2, k3, k4, k5, k6). Distortion models are based on [OpenCV's](https://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html) [pinhole camera model](https://en.wikipedia.org/wiki/Distortion_%28optics%29#Software_correction). This is the same [implementation used by ROS](http://docs.ros.org/en/diamondback/api/image_geometry/html/c++/pinhole__camera__model_8cpp_source.html) */ distortionModel: string; /** Distortion parameters */ D: number[]; /** * Intrinsic camera matrix (3x3 row-major matrix) * * A 3x3 row-major matrix for the raw (distorted) image. * * Projects 3D points in the camera coordinate frame to 2D pixel coordinates using the focal lengths (fx, fy) and principal point (cx, cy). * * ``` * [fx 0 cx] * K = [ 0 fy cy] * [ 0 0 1] * ``` */ K: number[]; /** * Rectification matrix (stereo cameras only, 3x3 row-major matrix) * * A rotation matrix aligning the camera coordinate system to the ideal stereo image plane so that epipolar lines in both stereo images are parallel. */ R: number[]; /** * Projection/camera matrix (3x4 row-major matrix) * * ``` * [fx' 0 cx' Tx] * P = [ 0 fy' cy' Ty] * [ 0 0 1 0] * ``` * * By convention, this matrix specifies the intrinsic (camera) matrix of the processed (rectified) image. That is, the left 3x3 portion is the normal camera intrinsic matrix for the rectified image. * * It projects 3D points in the camera coordinate frame to 2D pixel coordinates using the focal lengths (fx', fy') and principal point (cx', cy') - these may differ from the values in K. * * For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will also have R = the identity and P[1:3,1:3] = K. * * For a stereo pair, the fourth column [Tx Ty 0]' is related to the position of the optical center of the second camera in the first camera's frame. We assume Tz = 0 so both cameras are in the same stereo image plane. The first camera always has Tx = Ty = 0. For the right (second) camera of a horizontal stereo pair, Ty = 0 and Tx = -fx' * B, where B is the baseline between the cameras. * * Given a 3D point [X Y Z]', the projection (x, y) of the point onto the rectified image is given by: * * ``` * [u v w]' = P * [X Y Z 1]' * x = u / w * y = v / w * ``` * * This holds for both images of a stereo pair. */ P: number[]; } export declare const CameraCalibration: MessageFns; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in Exclude]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & { [K in Exclude | "$type">]: never; }; interface MessageFns { readonly $type: V; encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create, I>>(base?: I): T; fromPartial, I>>(object: I): T; } export {};