Package boofcv.abst.sfm.d3
Class VisOdomPixelDepthPnP_to_DepthVisualOdometry<Vis extends ImageBase<Vis>,Depth extends ImageGray<Depth>>
java.lang.Object
boofcv.abst.sfm.d3.VisOdomPixelDepthPnP_to_DepthVisualOdometry<Vis,Depth>
- All Implemented Interfaces:
AccessPointTracks
,AccessPointTracks3D
,DepthVisualOdometry<Vis,
,Depth> VisualOdometry<Se3_F64>
,VerbosePrint
public class VisOdomPixelDepthPnP_to_DepthVisualOdometry<Vis extends ImageBase<Vis>,Depth extends ImageGray<Depth>>
extends Object
implements DepthVisualOdometry<Vis,Depth>, AccessPointTracks3D
Wrapper around
VisOdomMonoDepthPnP
for DepthVisualOdometry
.-
Field Summary
Fields inherited from interface boofcv.abst.sfm.d3.VisualOdometry
VERBOSE_TRACKING
-
Constructor Summary
ConstructorDescriptionVisOdomPixelDepthPnP_to_DepthVisualOdometry
(DepthSparse3D<Depth> sparse3D, VisOdomMonoDepthPnP<Vis> alg, DistanceFromModelMultiView<Se3_F64, Point2D3D> distance, ImageType<Vis> visualType, Class<Depth> depthType) -
Method Summary
Modifier and TypeMethodDescriptiongetAllTracks
(@Nullable List<Point2D_F64> storage) All the points being actively tracked in pixel coordinates.Returns the estimated motion relative to the first frame in which a fatal error does not happen.Type of depth images it can process.long
Returns the ID of the most recently processed frame.int
Returns the total number of trackslong
getTrackId
(int index) Used to get the track ID of an active Trackvoid
getTrackPixel
(int index, Point2D_F64 pixel) Gets the observed coordinate of a feature in the input image.boolean
getTrackWorld3D
(int index, Point3D_F64 world) Returns the 3D location of the active track.Type of visual images it can process.boolean
isFault()
If a fatal error occurred while updating its state then this function will return true.boolean
isTrackInlier
(int index) True if the specified track is an inlier used in motion estimationboolean
isTrackNew
(int index) True if the specified track was just spawnedboolean
Process the new image and update the motion estimate.void
reset()
Forget past history and tracking results, returning it to its initial state.void
setCalibration
(CameraPinholeBrown paramVisual, Point2Transform2_F32 visToDepth) Specifies the intrinsic parameters for the visual camera and the transform from visual to depth pixels.void
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Constructor Details
-
VisOdomPixelDepthPnP_to_DepthVisualOdometry
public VisOdomPixelDepthPnP_to_DepthVisualOdometry(DepthSparse3D<Depth> sparse3D, VisOdomMonoDepthPnP<Vis> alg, DistanceFromModelMultiView<Se3_F64, Point2D3D> distance, ImageType<Vis> visualType, Class<Depth> depthType)
-
-
Method Details
-
getTrackWorld3D
Description copied from interface:AccessPointTracks3D
Returns the 3D location of the active track.- Specified by:
getTrackWorld3D
in 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:AccessPointTracks
Returns the total number of tracks- Specified by:
getTotalTracks
in interfaceAccessPointTracks
-
getTrackId
public long getTrackId(int index) Description copied from interface:AccessPointTracks
Used to get the track ID of an active Track- Specified by:
getTrackId
in interfaceAccessPointTracks
- Parameters:
index
- which track- Returns:
- The track's ID
-
getTrackPixel
Description copied from interface:AccessPointTracks
Gets the observed coordinate of a feature in the input image.- Specified by:
getTrackPixel
in interfaceAccessPointTracks
- Parameters:
index
- Which point in the listpixel
- Where the coordinate will be writen to.
-
getAllTracks
Description copied from interface:AccessPointTracks
All the points being actively tracked in pixel coordinates.- Specified by:
getAllTracks
in interfaceAccessPointTracks
- Returns:
- all active tracks in pixel coordinates
-
isTrackInlier
public boolean isTrackInlier(int index) Description copied from interface:AccessPointTracks
True if the specified track is an inlier used in motion estimation- Specified by:
isTrackInlier
in 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:AccessPointTracks
True if the specified track was just spawned- Specified by:
isTrackNew
in interfaceAccessPointTracks
- Parameters:
index
- The index in all- Returns:
- if it is new or not
-
setCalibration
Description copied from interface:DepthVisualOdometry
Specifies the intrinsic parameters for the visual camera and the transform from visual to depth pixels.- Specified by:
setCalibration
in interfaceDepthVisualOdometry<Vis extends ImageBase<Vis>,
Depth extends ImageGray<Depth>> - Parameters:
paramVisual
- Intrinsic parameters for visual cameravisToDepth
- Transform from visual camera pixels into depth camera pixels
-
process
Description copied from interface:DepthVisualOdometry
Process 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. -
reset
public void reset()Description copied from interface:VisualOdometry
Forget past history and tracking results, returning it to its initial state.- Specified by:
reset
in interfaceVisualOdometry<Vis extends ImageBase<Vis>>
-
isFault
public boolean isFault()Description copied from interface:VisualOdometry
If 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:
isFault
in interfaceVisualOdometry<Vis extends ImageBase<Vis>>
- Returns:
- true if a fatal error has occurred.
-
getCameraToWorld
Description copied from interface:VisualOdometry
Returns the estimated motion relative to the first frame in which a fatal error does not happen.- Specified by:
getCameraToWorld
in interfaceVisualOdometry<Vis extends ImageBase<Vis>>
- Returns:
- Found pose.
-
getFrameID
public long getFrameID()Description copied from interface:VisualOdometry
Returns the ID of the most recently processed frame. Starts at zero and increments with each call to process.- Specified by:
getFrameID
in interfaceVisualOdometry<Vis extends ImageBase<Vis>>
-
getVisualType
Description copied from interface:DepthVisualOdometry
Type of visual images it can process.- Specified by:
getVisualType
in interfaceDepthVisualOdometry<Vis extends ImageBase<Vis>,
Depth extends ImageGray<Depth>> - Returns:
- The image type
-
getDepthType
Description copied from interface:DepthVisualOdometry
Type of depth images it can process.- Specified by:
getDepthType
in interfaceDepthVisualOdometry<Vis extends ImageBase<Vis>,
Depth extends ImageGray<Depth>> - Returns:
- The image type
-
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbose
in interfaceVerbosePrint
-