pub enum LensProfile {
GoproHero9Wide,
GoproHero11Linear,
Iphone14ProMain,
DjiMini3ProWide,
Custom {
k1: f32,
k2: f32,
scale: f32,
},
}Expand description
Predefined lens distortion correction profiles for common cameras.
Each variant stores the radial coefficients (k1, k2) and a scale
factor that zooms slightly to hide the warped border pixels left after
correction.
Use with FilterGraph::lens_profile.
Variants§
GoproHero9Wide
GoPro Hero 9 / 10 / 11 wide-angle mode (heavy barrel distortion).
GoproHero11Linear
GoPro Hero 11 linear mode (mild distortion).
Iphone14ProMain
Apple iPhone 14 Pro main camera (mild barrel).
DjiMini3ProWide
DJI Mini 3 Pro wide-angle lens.
Custom
User-supplied coefficients for any other camera.
Implementations§
Source§impl LensProfile
impl LensProfile
Sourcepub fn coefficients(&self) -> (f32, f32, f32)
pub fn coefficients(&self) -> (f32, f32, f32)
Return (k1, k2, scale) for this profile.
Trait Implementations§
Source§impl Clone for LensProfile
impl Clone for LensProfile
Source§fn clone(&self) -> LensProfile
fn clone(&self) -> LensProfile
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 LensProfile
impl Debug for LensProfile
Source§impl PartialEq for LensProfile
impl PartialEq for LensProfile
impl Copy for LensProfile
impl StructuralPartialEq for LensProfile
Auto Trait Implementations§
impl Freeze for LensProfile
impl RefUnwindSafe for LensProfile
impl Send for LensProfile
impl Sync for LensProfile
impl Unpin for LensProfile
impl UnsafeUnpin for LensProfile
impl UnwindSafe for LensProfile
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