Package boofcv.abst.sfm.d3
Class WrapVisOdomQuadPnP<T extends boofcv.struct.image.ImageGray<T>,TD extends boofcv.struct.feature.TupleDesc>
- java.lang.Object
-
- boofcv.abst.sfm.d3.WrapVisOdomQuadPnP<T,TD>
-
- All Implemented Interfaces:
AccessPointTracks,AccessPointTracks3D,StereoVisualOdometry<T>,VisualOdometry<georegression.struct.se.Se3_F64>,org.ddogleg.struct.VerbosePrint
public class WrapVisOdomQuadPnP<T extends boofcv.struct.image.ImageGray<T>,TD extends boofcv.struct.feature.TupleDesc> extends java.lang.Object implements StereoVisualOdometry<T>, AccessPointTracks3D
Wrapper aroundVisOdomStereoQuadPnPforStereoVisualOdometry.
-
-
Field Summary
-
Fields inherited from interface boofcv.abst.sfm.d3.VisualOdometry
VERBOSE_RUNTIME, VERBOSE_TRACKING
-
-
Constructor Summary
Constructors Constructor Description WrapVisOdomQuadPnP(VisOdomStereoQuadPnP<T,TD> alg, RefinePnPStereo refine, AssociateStereo2D<TD> associateStereo, PnPStereoDistanceReprojectionSq distance, boofcv.alg.geo.DistanceFromModelMultiView<georegression.struct.se.Se3_F64,boofcv.struct.geo.Point2D3D> distanceMono, java.lang.Class<T> imageType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<georegression.struct.point.Point2D_F64>getAllTracks(java.util.List<georegression.struct.point.Point2D_F64> storage)All the points being actively tracked in pixel coordinates.georegression.struct.se.Se3_F64getCameraToWorld()Returns the estimated motion relative to the first frame in which a fatal error does not happen.longgetFrameID()Returns the ID of the most recently processed frame.boofcv.struct.image.ImageType<T>getImageType()Type of input images it can process.intgetTotalTracks()Returns the total number of trackslonggetTrackId(int index)Used to get the track ID of an active TrackvoidgetTrackPixel(int index, georegression.struct.point.Point2D_F64 pixel)Gets the observed coordinate of a feature in the input image.booleangetTrackWorld3D(int index, georegression.struct.point.Point3D_F64 world)Returns the 3D location of the active track.booleanisFault()If a fatal error occurred while updating its state then this function will return true.booleanisTrackInlier(int index)True if the specified track is an inlier used in motion estimationbooleanisTrackNew(int index)True if the specified track was just spawnedbooleanprocess(T leftImage, T rightImage)Process the new image and update the motion estimate.voidreset()Forget past history and tracking results, returning it to its initial state.voidsetCalibration(boofcv.struct.calib.StereoParameters parameters)Specifies intrinsic and extrinsic parameters for the stereo camera system.voidsetVerbose(java.io.PrintStream out, java.util.Set<java.lang.String> configuration)
-
-
-
Constructor Detail
-
WrapVisOdomQuadPnP
public WrapVisOdomQuadPnP(VisOdomStereoQuadPnP<T,TD> alg, RefinePnPStereo refine, AssociateStereo2D<TD> associateStereo, PnPStereoDistanceReprojectionSq distance, boofcv.alg.geo.DistanceFromModelMultiView<georegression.struct.se.Se3_F64,boofcv.struct.geo.Point2D3D> distanceMono, java.lang.Class<T> imageType)
-
-
Method Detail
-
getTrackWorld3D
public boolean getTrackWorld3D(int index, georegression.struct.point.Point3D_F64 world)Description copied from interface:AccessPointTracks3DReturns the 3D location of the active track.- Specified by:
getTrackWorld3Din interfaceAccessPointTracks3D- Parameters:
index- The track's index in the active listworld- The world coordinate of the track- Returns:
- true if there's a location estimate or false if there isn't
-
getTotalTracks
public int getTotalTracks()
Description copied from interface:AccessPointTracksReturns the total number of tracks- Specified by:
getTotalTracksin interfaceAccessPointTracks
-
getTrackId
public long getTrackId(int index)
Description copied from interface:AccessPointTracksUsed to get the track ID of an active Track- Specified by:
getTrackIdin interfaceAccessPointTracks- Parameters:
index- which track- Returns:
- The track's ID
-
getTrackPixel
public void getTrackPixel(int index, georegression.struct.point.Point2D_F64 pixel)Description copied from interface:AccessPointTracksGets the observed coordinate of a feature in the input image.- Specified by:
getTrackPixelin interfaceAccessPointTracks- Parameters:
index- Which point in the listpixel- Where the coordinate will be writen to.
-
getAllTracks
public java.util.List<georegression.struct.point.Point2D_F64> getAllTracks(@Nullable java.util.List<georegression.struct.point.Point2D_F64> storage)Description copied from interface:AccessPointTracksAll the points being actively tracked in pixel coordinates.- Specified by:
getAllTracksin interfaceAccessPointTracks- Returns:
- all active tracks in pixel coordinates
-
isTrackInlier
public boolean isTrackInlier(int index)
Description copied from interface:AccessPointTracksTrue if the specified track is an inlier used in motion estimation- Specified by:
isTrackInlierin interfaceAccessPointTracks- Parameters:
index- The index in all- Returns:
- if it is an inlier or not
-
isTrackNew
public boolean isTrackNew(int index)
Description copied from interface:AccessPointTracksTrue if the specified track was just spawned- Specified by:
isTrackNewin interfaceAccessPointTracks- Parameters:
index- The index in all- Returns:
- if it is new or not
-
setCalibration
public void setCalibration(boofcv.struct.calib.StereoParameters parameters)
Description copied from interface:StereoVisualOdometrySpecifies intrinsic and extrinsic parameters for the stereo camera system. Can be called at any time, but must be called at least once beforeStereoVisualOdometry.process(T, T)can be called.- Specified by:
setCalibrationin interfaceStereoVisualOdometry<T extends boofcv.struct.image.ImageGray<T>>- Parameters:
parameters- stereo calibration
-
reset
public void reset()
Description copied from interface:VisualOdometryForget past history and tracking results, returning it to its initial state.- Specified by:
resetin interfaceVisualOdometry<T extends boofcv.struct.image.ImageGray<T>>
-
getCameraToWorld
public georegression.struct.se.Se3_F64 getCameraToWorld()
Description copied from interface:VisualOdometryReturns the estimated motion relative to the first frame in which a fatal error does not happen.- Specified by:
getCameraToWorldin interfaceVisualOdometry<T extends boofcv.struct.image.ImageGray<T>>- Returns:
- Found pose.
-
getFrameID
public long getFrameID()
Description copied from interface:VisualOdometryReturns the ID of the most recently processed frame. Starts at zero and increments with each call to process.- Specified by:
getFrameIDin interfaceVisualOdometry<T extends boofcv.struct.image.ImageGray<T>>
-
process
public boolean process(T leftImage, T rightImage)
Description copied from interface:StereoVisualOdometryProcess the new image and update the motion estimate. The return value must be checked to see if the estimate was actually updated. If false is returned thenVisualOdometry.isFault()also needs to be checked to see if the pose estimate has been reset.- Specified by:
processin interfaceStereoVisualOdometry<T extends boofcv.struct.image.ImageGray<T>>- Returns:
- true if the motion estimate has been updated and false if not
-
isFault
public boolean isFault()
Description copied from interface:VisualOdometryIf a fatal error occurred while updating its state then this function will return true. Before more images can be processedVisualOdometry.reset()must be called. Only needs to be called if process returns false.- Specified by:
isFaultin interfaceVisualOdometry<T extends boofcv.struct.image.ImageGray<T>>- Returns:
- true if a fatal error has occurred.
-
getImageType
public boofcv.struct.image.ImageType<T> getImageType()
Description copied from interface:StereoVisualOdometryType of input images it can process.- Specified by:
getImageTypein interfaceStereoVisualOdometry<T extends boofcv.struct.image.ImageGray<T>>- Returns:
- The image type
-
setVerbose
public void setVerbose(@Nullable java.io.PrintStream out, @Nullable java.util.Set<java.lang.String> configuration)- Specified by:
setVerbosein interfaceorg.ddogleg.struct.VerbosePrint
-
-