pub struct HistogramEqualizer { /* private fields */ }Expand description
GPU-accelerated (CPU-fallback) histogram equalizer.
Implementations§
Source§impl HistogramEqualizer
impl HistogramEqualizer
Sourcepub fn new(config: HistogramEqualizerConfig) -> Self
pub fn new(config: HistogramEqualizerConfig) -> Self
Create a new equalizer with the given configuration.
Sourcepub fn default_config() -> Self
pub fn default_config() -> Self
Create with default configuration (luma-only, no clip limit).
Sourcepub fn equalize(
&self,
_device: &GpuDevice,
input: &[u8],
output: &mut [u8],
width: u32,
height: u32,
) -> Result<()>
pub fn equalize( &self, _device: &GpuDevice, input: &[u8], output: &mut [u8], width: u32, height: u32, ) -> Result<()>
Equalize the histogram of an RGBA image.
input/output– packed RGBA, 4 bytes per pixel.device– reserved for GPU dispatch; CPU path is used automatically.
§Errors
Returns an error if dimensions are invalid or buffers are too small.
Auto Trait Implementations§
impl Freeze for HistogramEqualizer
impl RefUnwindSafe for HistogramEqualizer
impl Send for HistogramEqualizer
impl Sync for HistogramEqualizer
impl Unpin for HistogramEqualizer
impl UnsafeUnpin for HistogramEqualizer
impl UnwindSafe for HistogramEqualizer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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