CameraParameterSettings

Global settings object for LumiScan VGR.

Multiply inherits hdv::camera::CameraSystemSettings – cameraDrivers[] (GenTL producers/vendor plugins), cameras[] (the physical camera roster: cameraId/serial/driverId, plus which feature files each one applies) and featureSets[] (the named configurations selectable at runtime). That is the whole camera model now: VGR has no per-camera settings of its own, and the old recordings[] array is gone. All three serialize at the top level, unwrapped (see serialization.cpp). Always write hdv::camera::CameraSystemSettings fully qualified inside this class’s own scope – injected-class-name lookup would otherwise resolve the bare name to this base rather than VGR’s own output-settings type of the same unqualified name in src/camera/settings.h, reached via system/SystemSettings. What the project knows about one camera that the camera cannot say for itself. One entry per camera, keyed by cameraId. Every field is independently optional: an entry may pin the lens, the point cloud’s unit, or both. What they share is the reason they exist – a driver that cannot answer, and a commissioned system that wants the values it was validated with rather than whatever the current driver reports. They are one array rather than two because they are keyed alike, looked up together and, between them, describe one camera. Lens intrinsics (fx/fy/cx/cy). VGR reads these from the camera’s own CalibFocalLengthX/Y and CalibOpticalCenterX/Y features. Those are names hdv’s plugins define, so a plain GenICam camera has no way to answer them – a Teledyne e2v publishes 288 features and not one is a focal length or a principal point. Without an answer VGR used another camera’s lens, wrong by hundreds of pixels, silently skewing every projection the 3D detection does. Point-cloud unit (distanceUnit). A camera’s RANGE coordinates carry no unit of their own. VGR asks the camera through hdv’s feature HDVPointcloudUnit – the unit of the cloud hdv delivers, stated by hdv’s plugins and, for a GenTL camera, by hdv’s table of known cameras (Teledyne Camera5d: Centimeter, although its Scan3dDistanceUnit says Millimeter) – and then through the GenICam feature Scan3dDistanceUnit. A camera that publishes neither, and that hdv does not know, is taken to deliver metres, wrong by a factor of 1000 for anything in millimetres: its cloud comes out 1000x too large and lands far outside the workspace (VGR warns when the cloud looks like that). distanceUnit is therefore needed for such a camera; it also overrides a camera that states a unit, which VGR warns about when they differ. One camera can be a live device or a replay of recordings (--simulate-camera points every camera at a file-backed driver). distanceUnit is the live device. A recording says its own unit in the dataset.unit.json of its folder (VGR saves a cloud in the unit its camera delivers, and writes that file); a folder without one is guessed from its first cloud. See pinnedDistanceUnit().

Member Functions

bool hasIntrinsics() const

A focal length of zero is not a lens, it is an unset field; cx/cy may legitimately be small. An entry that pins only the unit leaves these at zero and is perfectly valid.

Member Variables

cameraId

std::string JSON Type: string must match a cameraId in cameras

fx

double, default: \{0.0\} JSON Type: (optional) number focal length in pixels

fy

double, default: \{0.0\}

cx

double, default: \{0.0\} JSON Type: (optional) number principal point in pixels

cy

double, default: \{0.0\}

distanceUnit

std::optional< hdv::TRANSLATION_UNIT > JSON Type: (optional) TRANSLATION_UNIT "METER", "CENTIMETER" or "MILLIMETER" Absent means "ask the camera". The key’s presence is the pin, which is why this is an optional rather than an AUTO enumerator – writeToFile round-trips every field, so an AUTO would stamp itself into every settings file and say nothing.