pub struct ViewCorrection {
pub model: ViewModel,
pub matrix: [[f64; 3]; 3],
pub landmarks: Vec<ReferenceLandmark>,
pub residual_px: f64,
}Expand description
How a print’s drawings map the calibrated view onto the current frame.
Fields§
§model: ViewModelThe model matrix is of.
matrix: [[f64; 3]; 3]Maps a pixel of the calibrated view to the current frame, in homogeneous coordinates, row by row.
landmarks: Vec<ReferenceLandmark>The landmarks found agreeing on the frame the correction was taken on, which later frames are compared against.
residual_px: f64The RMS distance between those landmarks’ offsets and the correction’s shift, in pixels: how far the landmarks disagree with the part.
Implementations§
Source§impl ViewCorrection
impl ViewCorrection
Sourcepub fn translation(
shift_px: [f64; 2],
landmarks: Vec<ReferenceLandmark>,
) -> Self
pub fn translation( shift_px: [f64; 2], landmarks: Vec<ReferenceLandmark>, ) -> Self
The translation by shift_px, its reference landmarks.
Trait Implementations§
Source§impl Clone for ViewCorrection
impl Clone for ViewCorrection
Source§impl Debug for ViewCorrection
impl Debug for ViewCorrection
Source§impl<'de> Deserialize<'de> for ViewCorrection
impl<'de> Deserialize<'de> for ViewCorrection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ViewCorrection
impl JsonSchema for ViewCorrection
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ViewCorrection
impl PartialEq for ViewCorrection
Source§impl Serialize for ViewCorrection
impl Serialize for ViewCorrection
impl StructuralPartialEq for ViewCorrection
Auto Trait Implementations§
impl Forget for ViewCorrection
impl Freeze for ViewCorrection
impl Move for ViewCorrection
impl RefUnwindSafe for ViewCorrection
impl Send for ViewCorrectionwhere
RawVecInner: Send,
impl Sync for ViewCorrectionwhere
RawVecInner: Sync,
impl Unpin for ViewCorrection
impl UnsafeUnpin for ViewCorrection
impl UnwindSafe for ViewCorrectionwhere
RawVecInner: UnwindSafe,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreimpl<T> Scalar for T
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.