Package com.irurueta.ar.sfm
Class ConstantVelocityModelSlamTwoViewsSparseReconstructor
java.lang.Object
com.irurueta.ar.sfm.BaseTwoViewsSparseReconstructor<C,R,L>
com.irurueta.ar.sfm.BaseSlamTwoViewsSparseReconstructor<ConstantVelocityModelSlamCalibrationData,ConstantVelocityModelSlamTwoViewsSparseReconstructorConfiguration,ConstantVelocityModelSlamTwoViewsSparseReconstructor,ConstantVelocityModelSlamTwoViewsSparseReconstructorListener,ConstantVelocityModelSlamEstimator>
com.irurueta.ar.sfm.ConstantVelocityModelSlamTwoViewsSparseReconstructor
public class ConstantVelocityModelSlamTwoViewsSparseReconstructor
extends BaseSlamTwoViewsSparseReconstructor<ConstantVelocityModelSlamCalibrationData,ConstantVelocityModelSlamTwoViewsSparseReconstructorConfiguration,ConstantVelocityModelSlamTwoViewsSparseReconstructor,ConstantVelocityModelSlamTwoViewsSparseReconstructorListener,ConstantVelocityModelSlamEstimator>
Estimates cameras and 3D reconstructed points from sparse image point
correspondences in two 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.BaseSlamTwoViewsSparseReconstructor
slamEstimator
Fields inherited from class com.irurueta.ar.sfm.BaseTwoViewsSparseReconstructor
configuration, estimatedCamera1, estimatedCamera2, estimatedFundamentalMatrix, failed, listener, NUMBER_OF_VIEWS, reconstructedPoints, running
-
Constructor Summary
ConstructorsConstructorDescriptionConstantVelocityModelSlamTwoViewsSparseReconstructor
(ConstantVelocityModelSlamTwoViewsSparseReconstructorConfiguration configuration, ConstantVelocityModelSlamTwoViewsSparseReconstructorListener listener) Constructor.ConstantVelocityModelSlamTwoViewsSparseReconstructor
(ConstantVelocityModelSlamTwoViewsSparseReconstructorListener listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
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.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, reset, start
-
Constructor Details
-
ConstantVelocityModelSlamTwoViewsSparseReconstructor
public ConstantVelocityModelSlamTwoViewsSparseReconstructor(ConstantVelocityModelSlamTwoViewsSparseReconstructorConfiguration configuration, ConstantVelocityModelSlamTwoViewsSparseReconstructorListener 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.
-
ConstantVelocityModelSlamTwoViewsSparseReconstructor
public ConstantVelocityModelSlamTwoViewsSparseReconstructor(ConstantVelocityModelSlamTwoViewsSparseReconstructorListener 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 ofBaseTwoViewsSparseReconstructor.start()
to build the reconstruction step by step, one view at a time.- Overrides:
processOneView
in classBaseTwoViewsSparseReconstructor<ConstantVelocityModelSlamTwoViewsSparseReconstructorConfiguration,
ConstantVelocityModelSlamTwoViewsSparseReconstructor, ConstantVelocityModelSlamTwoViewsSparseReconstructorListener> - Returns:
- true if more views can be processed, false when reconstruction has finished.
-
postProcessOne
protected boolean postProcessOne()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 classBaseTwoViewsSparseReconstructor<ConstantVelocityModelSlamTwoViewsSparseReconstructorConfiguration,
ConstantVelocityModelSlamTwoViewsSparseReconstructor, ConstantVelocityModelSlamTwoViewsSparseReconstructorListener> - Returns:
- true if post-processing succeeded, false otherwise.
-