Vision Messages

Camera metadata and compressed image types. For raw images, see the Image API.

from horus import CompressedImage, CameraInfo, StereoInfo, RegionOfInterest

CameraInfo

Camera intrinsic calibration — focal length, principal point, distortion.

info = horus.CameraInfo(
    width=640, height=480,
    fx=525.0, fy=525.0,     # Focal length (pixels)
    cx=320.0, cy=240.0,     # Principal point (pixels)
)
FieldTypeUnitDescription
width, heightintpxImage dimensions
fx, fyfloatpxFocal length
cx, cyfloatpxPrincipal point

CompressedImage

JPEG/PNG encoded image for network transport.

comp = horus.CompressedImage(format="jpeg", data=jpeg_bytes)

RegionOfInterest

Rectangular region within an image.

roi = horus.RegionOfInterest(x_offset=100, y_offset=50, width=200, height=150)

StereoInfo

Stereo camera configuration.

stereo = horus.StereoInfo(baseline=0.12, left_info=left_cam, right_info=right_cam)

See Also