pub enum Opcode {
Show 14 variants
WarpRectilinear {
planes: Vec<([f64; 4], [f64; 2])>,
cx: f64,
cy: f64,
},
WarpFisheye,
FixVignetteRadial {
k: [f64; 5],
cx: f64,
cy: f64,
},
FixBadPixelsConstant {
constant: u32,
bayer_phase: u32,
},
FixBadPixelsList {
bayer_phase: u32,
points: Vec<(u32, u32)>,
rects: Vec<(u32, u32, u32, u32)>,
},
TrimBounds {
top: u32,
left: u32,
bottom: u32,
right: u32,
},
MapTable {
region: Region,
table: Vec<u16>,
},
MapPolynomial {
region: Region,
coeffs: Vec<f64>,
},
GainMap {
region: Region,
points_v: u32,
points_h: u32,
spacing_v: f64,
spacing_h: f64,
origin_v: f64,
origin_h: f64,
map_planes: u32,
gains: Vec<f32>,
},
DeltaPerRow {
region: Region,
deltas: Vec<f32>,
},
DeltaPerColumn {
region: Region,
deltas: Vec<f32>,
},
ScalePerRow {
region: Region,
scales: Vec<f32>,
},
ScalePerColumn {
region: Region,
scales: Vec<f32>,
},
Other {
id: u32,
optional: bool,
},
}Expand description
A parsed opcode.
Variants§
WarpRectilinear
Lens distortion / lateral CA model (DNG 1.3 §6.2): per plane radial kr[0..4]
and tangential kt[0..2] coefficients around the optical centre (cx, cy)
(relative image coordinates). Reported, never applied.
WarpFisheye
FixVignetteRadial
Radial gain 1 + k0 r^2 + k1 r^4 + ... + k4 r^10 around (cx, cy) (relative
image coordinates), r normalised to 1 at the farthest image corner.
FixBadPixelsConstant
FixBadPixelsList
TrimBounds
MapTable
MapPolynomial
GainMap
Fields
DeltaPerRow
DeltaPerColumn
ScalePerRow
ScalePerColumn
Other
Unknown or unsupported opcode (id, flags); optional ones may be skipped.
Implementations§
Source§impl Opcode
impl Opcode
pub fn name(&self) -> &'static str
Sourcepub fn is_row_local(&self) -> bool
pub fn is_row_local(&self) -> bool
Whether apply computes each sample of this opcode from that sample and its
coordinates alone (no neighbours): such opcodes give the same result applied to
any window of rows (e.g. band by band) as applied to the whole image. True for
everything except the bad-pixel repairs.
Sourcepub fn is_pixel_opcode(&self) -> bool
pub fn is_pixel_opcode(&self) -> bool
Whether apply implements this opcode.
Trait Implementations§
impl StructuralPartialEq for Opcode
Auto Trait Implementations§
impl Freeze for Opcode
impl RefUnwindSafe for Opcode
impl Send for Opcode
impl Sync for Opcode
impl Unpin for Opcode
impl UnsafeUnpin for Opcode
impl UnwindSafe for Opcode
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<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