Package com.irurueta.ar.sfm
Class ConstantVelocityModelSlamSparseReconstructor
java.lang.Object
com.irurueta.ar.sfm.BaseSparseReconstructor<C,R,L>
com.irurueta.ar.sfm.BaseSlamSparseReconstructor<ConstantVelocityModelSlamCalibrationData,ConstantVelocityModelSlamSparseReconstructorConfiguration,ConstantVelocityModelSlamSparseReconstructor,ConstantVelocityModelSlamSparseReconstructorListener,ConstantVelocityModelSlamEstimator>
com.irurueta.ar.sfm.ConstantVelocityModelSlamSparseReconstructor
public class ConstantVelocityModelSlamSparseReconstructor
extends BaseSlamSparseReconstructor<ConstantVelocityModelSlamCalibrationData,ConstantVelocityModelSlamSparseReconstructorConfiguration,ConstantVelocityModelSlamSparseReconstructor,ConstantVelocityModelSlamSparseReconstructorListener,ConstantVelocityModelSlamEstimator>
Estimates cameras and 3D reconstructed points from sparse image point correspondences
in multiple views and using SLAM (with accelerometer and gyroscope data) with constant
velocity model for overall scale estimation.
-
Field Summary
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
ConstructorsConstructorDescriptionConstantVelocityModelSlamSparseReconstructor
(ConstantVelocityModelSlamSparseReconstructorConfiguration configuration, ConstantVelocityModelSlamSparseReconstructorListener listener) Constructor.ConstantVelocityModelSlamSparseReconstructor
(ConstantVelocityModelSlamSparseReconstructorListener listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
postProcessOne
(boolean isInitialPairOfViews) Called when processing one frame is successfully finished.boolean
Process one view of all the available data during the reconstruction.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, reset, start
-
Constructor Details
-
ConstantVelocityModelSlamSparseReconstructor
public ConstantVelocityModelSlamSparseReconstructor(ConstantVelocityModelSlamSparseReconstructorConfiguration configuration, ConstantVelocityModelSlamSparseReconstructorListener listener) Constructor.- Parameters:
configuration
- configuration for this re-constructor.listener
- listener in charge of handling events.- Throws:
NullPointerException
- if listener or configuration is not provided.
-
ConstantVelocityModelSlamSparseReconstructor
public ConstantVelocityModelSlamSparseReconstructor(ConstantVelocityModelSlamSparseReconstructorListener listener) Constructor.- Parameters:
listener
- listener in charge of handling events.- Throws:
NullPointerException
- if listener is not provided.
-
-
Method Details
-
processOneView
public boolean processOneView()Process one view of all the available data during the reconstruction. This method can be called multiple times instead ofBaseSparseReconstructor.start()
to build the reconstruction step by step, one view at a time.- Overrides:
processOneView
in classBaseSparseReconstructor<ConstantVelocityModelSlamSparseReconstructorConfiguration,
ConstantVelocityModelSlamSparseReconstructor, ConstantVelocityModelSlamSparseReconstructorListener> - Returns:
- true if more views can be processed, false when reconstruction has finished.
-
postProcessOne
protected boolean postProcessOne(boolean isInitialPairOfViews) Called when processing one frame is successfully finished. This can be done to estimate scale on those implementations where scale can be measured or is already known.- Specified by:
postProcessOne
in classBaseSparseReconstructor<ConstantVelocityModelSlamSparseReconstructorConfiguration,
ConstantVelocityModelSlamSparseReconstructor, ConstantVelocityModelSlamSparseReconstructorListener> - Parameters:
isInitialPairOfViews
- true if initial pair of views is being processed, false otherwise.- Returns:
- true if post-processing succeeded, false otherwise.
-