Package com.irurueta.ar.sfm
Class BaseAbsoluteOrientationSlamPairedViewsSparseReconstructor<D extends BaseCalibrationData,C extends BaseSlamPairedViewsSparseReconstructorConfiguration<D,C>,R extends BaseSlamPairedViewsSparseReconstructor<D,C,R,L,S>,L extends BaseSlamPairedViewsSparseReconstructorListener<R>,S extends AbsoluteOrientationBaseSlamEstimator<D>>
java.lang.Object
com.irurueta.ar.sfm.BasePairedViewsSparseReconstructor<C,R,L>
com.irurueta.ar.sfm.BaseSlamPairedViewsSparseReconstructor<D,C,R,L,S>
com.irurueta.ar.sfm.BaseAbsoluteOrientationSlamPairedViewsSparseReconstructor<D,C,R,L,S>
- Type Parameters:
D
- calibrator type associated to implementations of SLAM calibration data.C
- type of configuration.R
- type of re-constructor.L
- type of listener.S
- type of SLAM estimator.
- Direct Known Subclasses:
AbsoluteOrientationConstantVelocityModelSlamPairedViewsSparseReconstructor
,AbsoluteOrientationSlamPairedViewsSparseReconstructor
public abstract class BaseAbsoluteOrientationSlamPairedViewsSparseReconstructor<D extends BaseCalibrationData,C extends BaseSlamPairedViewsSparseReconstructorConfiguration<D,C>,R extends BaseSlamPairedViewsSparseReconstructor<D,C,R,L,S>,L extends BaseSlamPairedViewsSparseReconstructorListener<R>,S extends AbsoluteOrientationBaseSlamEstimator<D>>
extends BaseSlamPairedViewsSparseReconstructor<D,C,R,L,S>
Base class in charge of estimating pairs of cameras and 3D reconstructed points from sparse
image point correspondences in multiple view pairs and also in charge of estimating overall
scene scale and absolute orientation by means of SLAM (Simultaneous Location And Mapping)
using data obtained from sensors like accelerometers or gyroscopes.
NOTE: absolute orientation slam estimators are not very accurate during estimation of
the orientation state, for that reason we take into account the initial orientation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.irurueta.geometry.Rotation3D
First sample of orientation received.Fields inherited from class com.irurueta.ar.sfm.BaseSlamPairedViewsSparseReconstructor
slamEstimator
Fields inherited from class com.irurueta.ar.sfm.BasePairedViewsSparseReconstructor
configuration, currentEuclideanEstimatedCamera, currentMetricEstimatedCamera, currentScale, currentViewId, DEFAULT_SCALE, euclideanReconstructedPoints, failed, lastEuclideanCameraCenter, lastEuclideanCameraRotation, listener, metricReconstructedPoints, MIN_NUMBER_OF_VIEWS, previousEuclideanEstimatedCamera, previousMetricEstimatedCamera, previousViewId, referenceEuclideanTransformation, running
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseAbsoluteOrientationSlamPairedViewsSparseReconstructor
(C configuration, L listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Indicates whether implementations of a re-constructor uses absolute orientation or not.protected boolean
transformPairOfCamerasAndPoints
(boolean isInitialPairOfViews, boolean hasAbsoluteOrientation) Transforms metric cameras on current pair of views so that they are referred to last kept location and rotation and upgrades cameras from metric stratum to Euclidean stratum.void
updateOrientationSample
(long timestamp, com.irurueta.geometry.Rotation3D orientation) Provides a new orientation sample to update SLAM estimator.Methods inherited from class com.irurueta.ar.sfm.BaseSlamPairedViewsSparseReconstructor
reset, setUpCalibrationData, setUpSlamEstimatorListener, updateAccelerometerSample, updateAccelerometerSample, updateGyroscopeSample, updateGyroscopeSample
Methods inherited from class com.irurueta.ar.sfm.BasePairedViewsSparseReconstructor
cancel, getConfiguration, getCurrentEstimatedFundamentalMatrix, getCurrentEuclideanEstimatedCamera, getCurrentMetricEstimatedCamera, getCurrentScale, getCurrentViewSamples, getEuclideanReconstructedPoints, getListener, getMetricReconstructedPoints, getPreviousEuclideanEstimatedCamera, getPreviousMetricEstimatedCamera, getPreviousViewSamples, getViewCount, hasFailed, isAdditionalViewPair, isCancelled, isFinished, isFirstViewPair, isRunning, processOneViewPair, start
-
Field Details
-
firstOrientation
private com.irurueta.geometry.Rotation3D firstOrientationFirst sample of orientation received.
-
-
Constructor Details
-
BaseAbsoluteOrientationSlamPairedViewsSparseReconstructor
Constructor.- Parameters:
configuration
- configuration for this re-constructor.listener
- listener in charge of handling events.- Throws:
NullPointerException
- if listener or configuration is not provided.
-
-
Method Details
-
updateOrientationSample
public void updateOrientationSample(long timestamp, com.irurueta.geometry.Rotation3D orientation) Provides a new orientation sample to update SLAM estimator. If re-constructor is not running, calling this method has no effect.- Parameters:
timestamp
- timestamp of accelerometer sample since epoch time and expressed in nanoseconds.orientation
- new orientation.
-
hasAbsoluteOrientation
protected boolean hasAbsoluteOrientation()Indicates whether implementations of a re-constructor uses absolute orientation or not.- Overrides:
hasAbsoluteOrientation
in classBaseSlamPairedViewsSparseReconstructor<D extends BaseCalibrationData,
C extends BaseSlamPairedViewsSparseReconstructorConfiguration<D, C>, R extends BaseSlamPairedViewsSparseReconstructor<D, C, R, L, S>, L extends BaseSlamPairedViewsSparseReconstructorListener<R>, S extends AbsoluteOrientationBaseSlamEstimator<D>> - Returns:
- true if absolute orientation is used, false, otherwise.
-
transformPairOfCamerasAndPoints
protected boolean transformPairOfCamerasAndPoints(boolean isInitialPairOfViews, boolean hasAbsoluteOrientation) Transforms metric cameras on current pair of views so that they are referred to last kept location and rotation and upgrades cameras from metric stratum to Euclidean stratum.- Overrides:
transformPairOfCamerasAndPoints
in classBaseSlamPairedViewsSparseReconstructor<D extends BaseCalibrationData,
C extends BaseSlamPairedViewsSparseReconstructorConfiguration<D, C>, R extends BaseSlamPairedViewsSparseReconstructor<D, C, R, L, S>, L extends BaseSlamPairedViewsSparseReconstructorListener<R>, S extends AbsoluteOrientationBaseSlamEstimator<D>> - Parameters:
isInitialPairOfViews
- true if initial pair of views is being processed, false otherwise.hasAbsoluteOrientation
- true if absolute orientation is required, false otherwise.- Returns:
- true if cameras were successfully transformed.
-