Package boofcv.alg.sfm.d3
Class VisOdomMonoOverheadMotion2D<T extends ImageBase<T>>
java.lang.Object
boofcv.alg.sfm.d3.VisOdomMonoOverheadMotion2D<T>
Estimates the motion of a monocular camera using the known transform between the camera and the ground plane. The
camera's image is converted into an orthogonal overhead view. Features are tracked inside the overhead image and
the 2D rigid body motion found. The output can be either the 2D motion or the 3D motion of the camera. There is
no scale ambiguity since the transform from the plane to camera is known.
The advantage of tracking inside the overhead view instead of the camera image is that the overhead view lacks
perspective distortion and is crops the image which does not contain the plane. Features without perspective
distortion are easier to track and many false positives are removed by removing many features not on the plane.
The plane which is being viewed is defined by the 'planeToCamera' transform. In the plane's reference frame the
plane lies along the x-z axis and contains point (0,0,0). See
CreateSyntheticOverheadView
for more
information about the ground plane coordinates and overhead image..-
Constructor Summary
ConstructorDescriptionVisOdomMonoOverheadMotion2D
(double cellSize, double maxCellsPerPixel, double mapHeightFraction, ImageMotion2D<T, Se2_F64> motion2D, ImageType<T> imageType) Configures motion estimation algorithm. -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureCamera
(CameraPinholeBrown intrinsic, Se3_F64 planeToCamera) Camera the camera's intrinsic and extrinsic parameters.2D motion algorithmOverhead image view2D motion.3D motion.boolean
Estimates the motion which the camera undergoes relative to the first frame processed.void
reset()
Resets the algorithm into its initial state
-
Constructor Details
-
VisOdomMonoOverheadMotion2D
public VisOdomMonoOverheadMotion2D(double cellSize, double maxCellsPerPixel, double mapHeightFraction, ImageMotion2D<T, Se2_F64> motion2D, ImageType<T> imageType) Configures motion estimation algorithm.- Parameters:
cellSize
- Size of cells in plane in world unitsmaxCellsPerPixel
- Specifies minimum resolution of a region in overhead image. A pixel in the camera can't overlap more than this number of map cells. Higher values allow lower resolution regions. Try 4.mapHeightFraction
- Reduce the map height by this fraction to avoid excessive unusable image space. Set to 1.0 to maximize the viewing area and any value less than one to crop it.motion2D
- Estimates motion inside the overhead image.
-
-
Method Details
-
configureCamera
Camera the camera's intrinsic and extrinsic parameters. Can be called at any time.- Parameters:
intrinsic
- Intrinsic camera parametersplaneToCamera
- Transform from the plane to camera.
-
reset
public void reset()Resets the algorithm into its initial state -
process
Estimates the motion which the camera undergoes relative to the first frame processed.- Parameters:
image
- Most recent camera image.- Returns:
- true if motion was estimated or false if a fault occurred. Should reset after a fault.
-
getWorldToCurr2D
2D motion.- Returns:
- from world to current frame.
-
getWorldToCurr3D
3D motion.- Returns:
- from world to current frame.
-
getOverhead
Overhead image view -
getMotion2D
2D motion algorithm
-