pub struct FourierCrop {
pub start_row: usize,
pub start_col: usize,
pub height: usize,
pub width: usize,
}Fields§
§start_row: usize§start_col: usize§height: usize§width: usizeImplementations§
Source§impl FourierCrop
impl FourierCrop
pub fn new( start_row: usize, start_col: usize, height: usize, width: usize, ) -> Self
pub fn validate_inside(&self, shape: (usize, usize)) -> Result<()>
pub fn extract<T: Copy>( &self, source: &Array2<T>, destination: &mut [T], ) -> Result<()>
pub fn validate_subpixel_inside( &self, shape: (usize, usize), offset: FourierOffset, ) -> Result<()>
Sourcepub fn extract_subpixel(
&self,
source: &Array2<Complex64>,
destination: &mut [Complex64],
offset: FourierOffset,
) -> Result<()>
pub fn extract_subpixel( &self, source: &Array2<Complex64>, destination: &mut [Complex64], offset: FourierOffset, ) -> Result<()>
Bilinearly samples a potentially fractional crop from source.
This is a local Fourier-grid interpolation, not a bandlimited shift operator. Its approximation error grows with grid-frequency content and fractional displacement; low-bandwidth objects are the intended regime.
Sourcepub fn insert_subpixel_adjoint(
&self,
destination: &mut Array2<Complex64>,
update: &[Complex64],
scale: f64,
offset: FourierOffset,
) -> Result<()>
pub fn insert_subpixel_adjoint( &self, destination: &mut Array2<Complex64>, update: &[Complex64], scale: f64, offset: FourierOffset, ) -> Result<()>
Adds the exact adjoint of Self::extract_subpixel to destination.
Trait Implementations§
Source§impl Clone for FourierCrop
impl Clone for FourierCrop
Source§fn clone(&self) -> FourierCrop
fn clone(&self) -> FourierCrop
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FourierCrop
impl Debug for FourierCrop
Source§impl<'de> Deserialize<'de> for FourierCrop
impl<'de> Deserialize<'de> for FourierCrop
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 PartialEq for FourierCrop
impl PartialEq for FourierCrop
Source§fn eq(&self, other: &FourierCrop) -> bool
fn eq(&self, other: &FourierCrop) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FourierCrop
impl Serialize for FourierCrop
impl Copy for FourierCrop
impl Eq for FourierCrop
impl StructuralPartialEq for FourierCrop
Auto Trait Implementations§
impl Freeze for FourierCrop
impl RefUnwindSafe for FourierCrop
impl Send for FourierCrop
impl Sync for FourierCrop
impl Unpin for FourierCrop
impl UnsafeUnpin for FourierCrop
impl UnwindSafe for FourierCrop
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