public class VisOdomPixelDepthPnP<T extends boofcv.struct.image.ImageBase<T>>
extends java.lang.Object
Estimate1ofPnP. Range is usually estimated using stereo cameras, structured
light or time of flight sensors. New features are added and removed as needed. Features are removed
if they are not part of the inlier feature set for some number of consecutive frames. New features are detected
and added if the inlier set falls below a threshold or every turn.
Non-linear refinement is optional and appears to provide a very modest improvement in performance. It is recommended
that motion is estimated using a P3P algorithm, which is the minimal case. Adding features every frame can be
computationally expensive, but having too few features being tracked will degrade accuracy. The algorithm was
designed to minimize magic numbers and to be insensitive to small changes in their values.
Due to the level of abstraction, it can't take full advantage of the sensors used to estimate 3D feature locations.
For example if a stereo camera is used then 3-view geometry can't be used to improve performance.| Constructor and Description |
|---|
VisOdomPixelDepthPnP(int thresholdAdd,
int thresholdRetire,
boolean doublePass,
org.ddogleg.fitting.modelset.ModelMatcher<georegression.struct.se.Se3_F64,boofcv.struct.geo.Point2D3D> motionEstimator,
ImagePixelTo3D pixelTo3D,
boofcv.abst.geo.RefinePnP refine,
boofcv.abst.feature.tracker.PointTrackerTwoPass<T> tracker,
boofcv.struct.distort.Point2Transform2_F64 pixelToNorm,
boofcv.struct.distort.Point2Transform2_F64 normToPixel)
Configures magic numbers and estimation algorithms.
|
| Modifier and Type | Method and Description |
|---|---|
georegression.struct.se.Se3_F64 |
getCurrToWorld() |
java.util.List<Point2D3DTrack> |
getInlierTracks() |
org.ddogleg.fitting.modelset.ModelMatcher<georegression.struct.se.Se3_F64,boofcv.struct.geo.Point2D3D> |
getMotionEstimator() |
long |
getTick() |
boofcv.abst.feature.tracker.PointTracker<T> |
getTracker() |
boolean |
process(T image)
Estimates the motion given the left camera image.
|
void |
reset()
Resets the algorithm into its original state
|
void |
setNormToPixel(boofcv.struct.distort.Point2Transform2_F64 normToPixel) |
void |
setPixelToNorm(boofcv.struct.distort.Point2Transform2_F64 pixelToNorm) |
public VisOdomPixelDepthPnP(int thresholdAdd,
int thresholdRetire,
boolean doublePass,
org.ddogleg.fitting.modelset.ModelMatcher<georegression.struct.se.Se3_F64,boofcv.struct.geo.Point2D3D> motionEstimator,
ImagePixelTo3D pixelTo3D,
boofcv.abst.geo.RefinePnP refine,
boofcv.abst.feature.tracker.PointTrackerTwoPass<T> tracker,
boofcv.struct.distort.Point2Transform2_F64 pixelToNorm,
boofcv.struct.distort.Point2Transform2_F64 normToPixel)
thresholdAdd - Add new tracks when less than this number are in the inlier set. Tracker dependent. Set to
a value ≤ 0 to add features every frame.thresholdRetire - Discard a track if it is not in the inlier set after this many updates. Try 2doublePass - Associate image features a second time using the estimated model from the first
try to improve resultsmotionEstimator - PnP motion estimator. P3P algorithm is recommended/pixelTo3D - Computes the 3D location of pixels.refine - Optional algorithm for refining the pose estimate. Can be null.tracker - Point feature tracker.pixelToNorm - Converts from raw image pixels into normalized image coordinates.normToPixel - Converts from normalized image coordinates into raw pixelspublic void reset()
public boolean process(T image)
image - Camera image.public georegression.struct.se.Se3_F64 getCurrToWorld()
public boofcv.abst.feature.tracker.PointTracker<T> getTracker()
public org.ddogleg.fitting.modelset.ModelMatcher<georegression.struct.se.Se3_F64,boofcv.struct.geo.Point2D3D> getMotionEstimator()
public java.util.List<Point2D3DTrack> getInlierTracks()
public void setPixelToNorm(boofcv.struct.distort.Point2Transform2_F64 pixelToNorm)
public void setNormToPixel(boofcv.struct.distort.Point2Transform2_F64 normToPixel)
public long getTick()