Measurements¶
A measurement defines a residual that is added to the optimization problem. They share the functionality of the following (unavailable) base class.
- 
class 
kontiki.measurements.Measurement¶ - 
error(trajectory : Trajectory) → ndarray¶ Compute the error (a ND-vector), before application of any loss function.
- 
measure(trajectory : Trajectory) → ndarray¶ The measured quantity, e.g. IMU accelerometer, or camera image projection.
- 
 
Camera measurements¶
The camera classes share the following base class:
- 
class 
kontiki.measurements.CameraMeasurement(camera, observation, huber_c=1)¶ Measurement of an
sfm.Observationinstance, using asensors.Camera. huber_c specifies the design parameter of the used Huber loss function.- 
observation¶ The
sfm.Observationinstance that is measured.
- 
camera¶ The
sensors.Cameraused.
- 
 
Camera measurement classes¶
- 
class 
kontiki.measurements.StaticRsCameraMeasurement¶ Static rolling shutter projection
Projects a landmark into a rolling shutter camera by simply setting the projection time from the observed image row. This method does in general not fulfill the rolling shutter projection time constraint, but is fast.
- 
class 
kontiki.measurements.NewtonRsCameraMeasurement¶ Newton-based rolling shutter projection
Projects a landmark into a rolling shutter camera using the Newton method. This method should produce measurements such that the projected image row is consistent with the projection time. However, this is not a guarantee, so if you really need to make sure that the rolling shutter prjection time constraint is fulfilled, we recommend to at least check the result before accepting it.
- 
class 
kontiki.measurements.LiftingRsCameraMeasurement¶ Rolling shutter projection by time optimization
Projects a landmark into a rolling shutter camera by adding the projection time as an additional parameter to the optimization problem.
In general, this does not fulfill the rolling shutter projection time constraint exactly.
- 
vt¶ The row projection time (to be optimized)
- 
 
IMU measurements¶
The IMU measurements share the following base class
- 
class 
kontiki.measurements.ImuMeasurement(imu, t, x, weight=1)¶ A measurement x (3D) at time t using the specified
sensors.Imuinstance. The scalar weight is applied to the residual, before being squared.- 
imu¶ The
sensors.Imuinstance used.
- 
t¶ The timestamp of the measurement
- 
weight¶ The (scalar) residual weight
-