Package com.irurueta.ar.sfm
Class SlamSparseReconstructor
java.lang.Object
com.irurueta.ar.sfm.BaseSparseReconstructor<C,R,L>
com.irurueta.ar.sfm.BaseSlamSparseReconstructor<SlamCalibrationData,SlamSparseReconstructorConfiguration,SlamSparseReconstructor,SlamSparseReconstructorListener,SlamEstimator>
com.irurueta.ar.sfm.SlamSparseReconstructor
public class SlamSparseReconstructor
extends BaseSlamSparseReconstructor<SlamCalibrationData,SlamSparseReconstructorConfiguration,SlamSparseReconstructor,SlamSparseReconstructorListener,SlamEstimator>
Estimates cameras and 3D reconstructed points from sparse image point correspondences
in multiple views and using SLAM (with accelerometer and gyroscope data) 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
ConstructorsConstructorDescriptionSlamSparseReconstructor
(SlamSparseReconstructorConfiguration configuration, SlamSparseReconstructorListener listener) Constructor.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
-
SlamSparseReconstructor
public SlamSparseReconstructor(SlamSparseReconstructorConfiguration configuration, SlamSparseReconstructorListener 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.
-
SlamSparseReconstructor
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<SlamSparseReconstructorConfiguration,
SlamSparseReconstructor, SlamSparseReconstructorListener> - 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<SlamSparseReconstructorConfiguration,
SlamSparseReconstructor, SlamSparseReconstructorListener> - Parameters:
isInitialPairOfViews
- true if initial pair of views is being processed, false otherwise.- Returns:
- true if post-processing succeeded, false otherwise.
-