Versions in this module Expand all Collapse all v0 v0.1.1 Oct 27, 2026 Changes in this version type Camera + func (c *Camera) Stats() Stats + type Stats struct + ColorDropped int64 + ColorFrames int64 + DepthDeviceSeq uint64 + DepthDropped int64 + DepthFrames int64 v0.1.0 Oct 27, 2026 Changes in this version + const FormatI420 + const FormatMJPG + const FormatRVL + const FormatY12C4 + const FormatY16 + const FormatY8 + const FormatYUYV + const GevStatusAccessDenied + const GevStatusError + const GevStatusSuccess + const PropColorAutoExposureBool + const PropCompatVersionInt + const PropDepthAlignHardwareBool + const PropDepthPrecisionLevelInt + const PropDeviceCommunicationTypeInt + const PropDevicePIDInt + const PropDisparityToDepthBool + const PropIRAutoExposureBool + const PropLaserBool + const PropStopColorStreamBool + const PropStopDepthStreamBool + const RawDataAlignCalibParam + const RawDataD2CAlignSupportProfileList + const RawDataDepthCalibParam + const RawDataEffectiveStreamProfileList + const SensorColor + const SensorConfidence + const SensorDepth + const SensorIR + const SensorIRLeft + const SensorIRRight + const StructVersion + var ErrAccessDenied = errors.New("camera is controlled by another application (GVCP access denied)") + var ErrAlreadyOpen = errors.New("camera is already open") + var ErrClosed = errors.New("device is closed") + var ErrTimeout = errors.New("timed out waiting for a frame") + type Calibration struct + Depth []DepthCalibParam + func (c *Calibration) BaselineMM() float64 + func (c *Calibration) ColorIntrinsics(w, h int) (Intrinsics, error) + func (c *Calibration) DepthIntrinsics(w, h int) (Intrinsics, error) + func (c *Calibration) DepthToColor() (Extrinsic, bool) + type Camera struct + func New(cfg Config) *Camera + func (c *Camera) BaselineMM() float64 + func (c *Camera) Close() error + func (c *Camera) ColorParams() *ColorParams + func (c *Camera) DeviceInfo() DeviceInfo + func (c *Camera) GrabColor(timeout time.Duration) (*ColorFrame, error) + func (c *Camera) GrabDepth(timeout time.Duration) (*DepthFrame, error) + func (c *Camera) HasColor() bool + func (c *Camera) Intrinsics() Intrinsics + func (c *Camera) IsAlive(maxAge time.Duration) bool + func (c *Camera) LastError() string + func (c *Camera) LatestColor(newerThan uint64, timeout time.Duration) (*ColorFrame, uint64) + func (c *Camera) Open() error + func (c *Camera) OpenContext(ctx context.Context) error + func (c *Camera) RecentDepths(n int, timeout, maxAge time.Duration) ([]*DepthFrame, error) + type ColorFrame struct + Height int + JPEG []byte + Metadata []byte + Seq uint64 + Time time.Time + Width int + func (f *ColorFrame) Clone() *ColorFrame + type ColorParams struct + DepthToRGB Extrinsic + Intrinsics Intrinsics + type Config struct + AliveTimeout time.Duration + Color *StreamConfig + ColorRTSPPort int + ControlPort int + Depth StreamConfig + DepthPrecision *DepthPrecision + DepthRTSPPort int + FrameIdleTimeout time.Duration + GVCPPort int + IP string + Logger *slog.Logger + NoColor bool + OpenRetries int + RetryWait time.Duration + RingSize int + type DepthCalibParam struct + Baseline float32 + DepthMode uint32 + DispOffset float32 + FocalPix float32 + InvalidDisp int32 + Unit float32 + Z0 float32 + type DepthFrame struct + Data []uint16 + DeviceSeq uint64 + DeviceTimestampUs uint64 + Height int + Metadata []byte + Seq uint64 + Time time.Time + Width int + func (f *DepthFrame) At(u, v int) uint16 + func (f *DepthFrame) Clone() *DepthFrame + type DepthPrecision int32 + const Precision0mm05 + const Precision0mm1 + const Precision0mm2 + const Precision0mm4 + const Precision0mm5 + const Precision0mm8 + const Precision1mm + const PrecisionKeep + func (p DepthPrecision) Unit() (float32, error) + type Device struct + func OpenDevice(ctx context.Context, opts DeviceOptions) (*Device, error) + func (d *Device) Calibration() *Calibration + func (d *Device) Close() error + func (d *Device) ControlLost() bool + func (d *Device) DepthUnitMM() float32 + func (d *Device) GetProperty(id uint32) (int32, error) + func (d *Device) GetPropertyRange(id uint32) (PropertyRange, error) + func (d *Device) Info() DeviceInfo + func (d *Device) Profiles() []EffectiveProfile + func (d *Device) SetProperty(id uint32, v int32) error + func (d *Device) StartColor(ctx context.Context, cfg StreamConfig, onFrame func(*ColorFrame)) (*Stream, error) + func (d *Device) StartDepth(ctx context.Context, cfg StreamConfig, onFrame func(*DepthFrame)) (*Stream, error) + func (d *Device) Version() VersionInfo + type DeviceError struct + Code uint16 + Msg string + Opcode uint16 + PropertyID uint32 + func (e *DeviceError) Error() string + type DeviceInfo struct + Connection string + Firmware string + Hardware string + IP string + MAC string + Name string + PID uint16 + Serial string + type DeviceOptions struct + ColorRTSPPort int + ControlPort int + DepthPrecision *DepthPrecision + DepthRTSPPort int + FrameIdleTimeout time.Duration + GVCPPort int + IP string + Logger *slog.Logger + ReadOnly bool + type DiscoveredDevice struct + Firmware string + Gateway string + IP string + LocalIP string + MAC string + Manufacturer string + Mask string + Model string + PID uint16 + Serial string + UserName string + func Discover(ctx context.Context, wait time.Duration) ([]DiscoveredDevice, error) + type EffectiveProfile struct + Format uint32 + Height int + MaxFPS int + Sensor uint32 + Width int + func (p EffectiveProfile) String() string + type Extrinsic struct + R [9]float64 + T [3]float64 + type FrameMetadata struct + ActualFPS uint8 + AnalogGain uint16 + AutoExposure bool + DigitalGain uint16 + Exposure uint32 + FrameCounter uint32 + GainLevel uint16 + Height uint16 + LaserPower uint16 + LaserPowerLevel uint8 + LaserStatus uint8 + SensorTimestampUs int64 + Width uint16 + func ParseFrameMetadata(b []byte, depth bool) (FrameMetadata, error) + type Intrinsics struct + Cx float64 + Cy float64 + Fx float64 + Fy float64 + Height int + Width int + type PropertyRange struct + Cur int32 + Def int32 + Max int32 + Min int32 + Step int32 + type Stream struct + func (s *Stream) Close() + func (s *Stream) Done() <-chan struct{} + func (s *Stream) Err() error + func (s *Stream) Stats() (frames, dropped int64) + type StreamConfig struct + FPS int + Height int + Width int + type VersionInfo struct + DepthChip string + DeviceName string + DeviceType int32 + Firmware string + Hardware string + MinSDK string + Serial string + SubSystem string + SystemChip string