pub struct Image {
pub image_id: u32,
pub quaternion: [f64; 4],
pub translation: [f64; 3],
pub camera_id: u32,
pub file_name: CString,
}
Expand description
A COLMAP image.
Fields§
§image_id: u32
Image ID.
quaternion: [f64; 4]
A normalized Hamiltonian quaternion.
It represents the rotation from world space to view space.
It is in scalar-first order, i.e., [w, x, y, z]
.
translation: [f64; 3]
Translation in view space.
camera_id: u32
§file_name: CString
Image file name.
Implementations§
source§impl Image
impl Image
sourcepub const fn position(&self, rotation: &[[f64; 3]; 3]) -> [f64; 3]
pub const fn position(&self, rotation: &[[f64; 3]; 3]) -> [f64; 3]
Return the 3D position in world space.
It takes the 3D rotation from world space to view space, i.e., Self::rotation
.
§Formula
Consider that 0 = Self::rotation * Self::position + Self::translation.
Therefore, Self::position = -Self::rotation^t * Self::translation.
Trait Implementations§
impl StructuralPartialEq for Image
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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