Package com.irurueta.ar.sfm
Class BaseAbsoluteOrientationSlamTwoViewsSparseReconstructor<D extends BaseCalibrationData,C extends BaseSlamTwoViewsSparseReconstructorConfiguration<D,C>,R extends BaseSlamTwoViewsSparseReconstructor<D,C,R,L,S>,L extends BaseSlamTwoViewsSparseReconstructorListener<R>,S extends AbsoluteOrientationBaseSlamEstimator<D>>
java.lang.Object
com.irurueta.ar.sfm.BaseTwoViewsSparseReconstructor<C,R,L>
com.irurueta.ar.sfm.BaseSlamTwoViewsSparseReconstructor<D,C,R,L,S>
com.irurueta.ar.sfm.BaseAbsoluteOrientationSlamTwoViewsSparseReconstructor<D,C,R,L,S>
- Type Parameters:
D
- type of calibration data.C
- type of configuration.R
- type of re-constructor.L
- type of listener.S
- type of SLAM estimator.
- Direct Known Subclasses:
AbsoluteOrientationConstantVelocityModelSlamTwoViewsSparseReconstructor
,AbsoluteOrientationSlamTwoViewsSparseReconstructor
public abstract class BaseAbsoluteOrientationSlamTwoViewsSparseReconstructor<D extends BaseCalibrationData,C extends BaseSlamTwoViewsSparseReconstructorConfiguration<D,C>,R extends BaseSlamTwoViewsSparseReconstructor<D,C,R,L,S>,L extends BaseSlamTwoViewsSparseReconstructorListener<R>,S extends AbsoluteOrientationBaseSlamEstimator<D>>
extends BaseSlamTwoViewsSparseReconstructor<D,C,R,L,S>
Base class in charge of estimating cameras and 3D reconstructed points from
sparse image point correspondences in two 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 TypeFieldDescriptionprotected com.irurueta.geometry.Rotation3D
First sample of orientation received.Fields inherited from class com.irurueta.ar.sfm.BaseSlamTwoViewsSparseReconstructor
slamEstimator
Fields inherited from class com.irurueta.ar.sfm.BaseTwoViewsSparseReconstructor
configuration, estimatedCamera1, estimatedCamera2, estimatedFundamentalMatrix, failed, listener, NUMBER_OF_VIEWS, reconstructedPoints, running
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseAbsoluteOrientationSlamTwoViewsSparseReconstructor
(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
Updates scene scale and orientation using SLAM data.Methods inherited from class com.irurueta.ar.sfm.BaseSlamTwoViewsSparseReconstructor
setUpCalibrationData, setUpSlamEstimatorListener, updateAccelerometerSample, updateAccelerometerSample, updateGyroscopeSample, updateGyroscopeSample, updateScale
Methods inherited from class com.irurueta.ar.sfm.BaseTwoViewsSparseReconstructor
cancel, getConfiguration, getEstimatedCamera1, getEstimatedCamera2, getEstimatedFundamentalMatrix, getListener, getReconstructedPoints, getViewCount, hasFailed, isCancelled, isFinished, isRunning, postProcessOne, processOneView, reset, start
-
Field Details
-
firstOrientation
protected com.irurueta.geometry.Rotation3D firstOrientationFirst sample of orientation received.
-
-
Constructor Details
-
BaseAbsoluteOrientationSlamTwoViewsSparseReconstructor
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()Updates scene scale and orientation using SLAM data.- Returns:
- true if scale was successfully updated, false otherwise.
-