scalacv.Odometry
See theOdometry companion object
final class Odometry extends AutoCloseable
A running visual-odometry pipeline: feed frames in order, get the camera's motion each step.
This is the front-end loop of visual SLAM, composing the per-frame primitives: it keeps the previous frame and its tracked points, follows them into each new frame with OpticalFlow, and estimates the step's motion with VisualOdometry. Chaining the steps is dead-reckoning — it drifts, and correcting that drift (loop closure, global optimisation) is the SLAM back end, beyond OpenCV.
Monocular, so each step's translation is a unit direction (scale is unobservable from one camera). The pipeline retains a frame's worth of native memory between calls, so it is AutoCloseable — close it.
val odometry = Odometry.monocular(Intrinsics(fx = 500, fy = 500, cx = 320, cy = 240))
try camera.foreach(frame => odometry.update(frame).foreach(step => track(step)))
finally odometry.close()
Not thread-safe: feed one frame at a time.
Attributes
- Companion
- object
- Source
- Odometry.scala
- Graph
-
- Supertypes
-
trait AutoCloseableclass Objecttrait Matchableclass Any
Members list
In this article