Package com.irurueta.ar.sfm
Class BaseAbsoluteOrientationSlamSparseReconstructor<D extends BaseCalibrationData,C extends BaseSlamSparseReconstructorConfiguration<D,C>,R extends BaseSlamSparseReconstructor<D,C,R,L,S>,L extends BaseSlamSparseReconstructorListener<R>,S extends AbsoluteOrientationBaseSlamEstimator<D>>
java.lang.Object
com.irurueta.ar.sfm.BaseSparseReconstructor<C,R,L>
com.irurueta.ar.sfm.BaseSlamSparseReconstructor<D,C,R,L,S>
com.irurueta.ar.sfm.BaseAbsoluteOrientationSlamSparseReconstructor<D,C,R,L,S>
- Type Parameters:
D
- type defining calibration data.C
- type of configuration.R
- type of re-constructor.L
- type of listener.S
- type of SLAM estimator.
- Direct Known Subclasses:
AbsoluteOrientationConstantVelocityModelSlamSparseReconstructor
,AbsoluteOrientationSlamSparseReconstructor
public abstract class BaseAbsoluteOrientationSlamSparseReconstructor<D extends BaseCalibrationData,C extends BaseSlamSparseReconstructorConfiguration<D,C>,R extends BaseSlamSparseReconstructor<D,C,R,L,S>,L extends BaseSlamSparseReconstructorListener<R>,S extends AbsoluteOrientationBaseSlamEstimator<D>>
extends BaseSlamSparseReconstructor<D,C,R,L,S>
Base class in charge of estimating cameras and 3D reconstructed points from sparse
image point correspondences in multiple views 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.private com.irurueta.geometry.Rotation3D
Inverse of first orientation.Fields inherited from class com.irurueta.ar.sfm.BaseSlamSparseReconstructor
slamEstimator, slamPosition
Fields inherited from class com.irurueta.ar.sfm.BaseSparseReconstructor
activeEuclideanReconstructedPoints, activeMetricReconstructedPoints, configuration, currentEuclideanEstimatedCamera, currentMetricEstimatedCamera, currentScale, DEFAULT_SCALE, failed, listener, MIN_NUMBER_OF_VIEWS, previousEuclideanEstimatedCamera, previousMetricEstimatedCamera, running
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseAbsoluteOrientationSlamSparseReconstructor
(C configuration, L listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
updateOrientationSample
(long timestamp, com.irurueta.geometry.Rotation3D orientation) Provides a new orientation sample to update SLAM estimator.protected boolean
updateScaleAndOrientation
(boolean isInitialPairOfViews) Updates scene scale and orientation using SLAM data.Methods inherited from class com.irurueta.ar.sfm.BaseSlamSparseReconstructor
setUpCalibrationData, setUpSlamEstimatorListener, updateAccelerometerSample, updateAccelerometerSample, updateGyroscopeSample, updateGyroscopeSample, updateScale
Methods inherited from class com.irurueta.ar.sfm.BaseSparseReconstructor
cancel, getActiveEuclideanReconstructedPoints, getActiveMetricReconstructedPoints, getConfiguration, getCurrentEstimatedFundamentalMatrix, getCurrentEuclideanEstimatedCamera, getCurrentMetricEstimatedCamera, getCurrentScale, getCurrentViewNewlySpawnedSamples, getCurrentViewTrackedSamples, getListener, getPreviousEuclideanEstimatedCamera, getPreviousMetricEstimatedCamera, getPreviousViewTrackedSamples, getViewCount, hasFailed, isAdditionalView, isCancelled, isFinished, isFirstView, isRunning, isSecondView, postProcessOne, processOneView, reset, start
-
Field Details
-
firstOrientation
private com.irurueta.geometry.Rotation3D firstOrientationFirst sample of orientation received. -
invFirstOrientation
private com.irurueta.geometry.Rotation3D invFirstOrientationInverse of first orientation.
-
-
Constructor Details
-
BaseAbsoluteOrientationSlamSparseReconstructor
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.
-
updateScaleAndOrientation
protected boolean updateScaleAndOrientation(boolean isInitialPairOfViews) Updates scene scale and orientation using SLAM data.- Parameters:
isInitialPairOfViews
- true if initial pair of views is being processed, false otherwise.- Returns:
- true if scale was successfully updated, false otherwise.
-