pub struct CameraSpecification {
pub pixels: Vector2<usize>,
pub pixel_dimensions: Vector2<f64>,
}Expand description
This contains basic camera specifications that one could find on a manufacturer’s website. This only contains parameters that cannot be changed about a camera. The focal length is not included since that can typically be changed and images can also be magnified.
All distance units should be in meters to avoid conversion issues.
Fields§
§pixels: Vector2<usize>§pixel_dimensions: Vector2<f64>Implementations§
Source§impl CameraSpecification
impl CameraSpecification
Sourcepub fn from_sensor(
pixels: Vector2<usize>,
sensor_dimensions: Vector2<f64>,
) -> Self
pub fn from_sensor( pixels: Vector2<usize>, sensor_dimensions: Vector2<f64>, ) -> Self
Creates a CameraSpecification using the sensor dimensions.
Sourcepub fn from_sensor_square(pixels: Vector2<usize>, sensor_width: f64) -> Self
pub fn from_sensor_square(pixels: Vector2<usize>, sensor_width: f64) -> Self
Creates a CameraSpecification using the sensor width assuming a square pixel.
Sourcepub fn intrinsics_centered(&self, focal: f64) -> CameraIntrinsics
pub fn intrinsics_centered(&self, focal: f64) -> CameraIntrinsics
Combines the CameraSpecification with a focal length to create a CameraIntrinsics.
This assumes square pixels and a perfectly centered principal point.
Trait Implementations§
Source§impl Clone for CameraSpecification
impl Clone for CameraSpecification
Source§fn clone(&self) -> CameraSpecification
fn clone(&self) -> CameraSpecification
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CameraSpecification
impl Debug for CameraSpecification
Source§impl PartialEq for CameraSpecification
impl PartialEq for CameraSpecification
Source§impl PartialOrd for CameraSpecification
impl PartialOrd for CameraSpecification
impl Copy for CameraSpecification
impl StructuralPartialEq for CameraSpecification
Auto Trait Implementations§
impl Freeze for CameraSpecification
impl RefUnwindSafe for CameraSpecification
impl Send for CameraSpecification
impl Sync for CameraSpecification
impl Unpin for CameraSpecification
impl UnwindSafe for CameraSpecification
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§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.