pub enum WarpModel {
Translation,
Rotation {
camera: Camera,
},
}Expand description
How a candidate motion displaces an event, as a function of how far it is from the reference time.
Variants§
Translation
Constant image-plane velocity, (vx, vy) in pixels per second. Two parameters.
The right model for a camera translating parallel to a flat scene, or for one small patch of any scene — and the only model the reference implementation has working.
Rotation
Camera rotation, (wx, wy, wz) in radians per second, about the optical centre. Three
parameters, and needs intrinsics to map pixels onto rays.
Rotation is the case where contrast maximisation is at its best: the warp is exact for any scene regardless of depth, because rotating a camera moves every ray the same way.
Implementations§
Source§impl WarpModel
impl WarpModel
Sourcepub fn translation() -> Self
pub fn translation() -> Self
The 2-DoF translation model.
Sourcepub fn dimensions(&self) -> usize
pub fn dimensions(&self) -> usize
Number of free parameters.
Trait Implementations§
impl Copy for WarpModel
impl StructuralPartialEq for WarpModel
Auto Trait Implementations§
impl Freeze for WarpModel
impl RefUnwindSafe for WarpModel
impl Send for WarpModel
impl Sync for WarpModel
impl Unpin for WarpModel
impl UnsafeUnpin for WarpModel
impl UnwindSafe for WarpModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more