pub trait Debayerwhere
Self: Sized,{
type Output;
// Required method
fn debayer(&self, alg: DemosaicMethod) -> Result<Self::Output, BayerError>;
}Expand description
Trait to apply a Demosaic algorithm to an image.
This trait is implemented for ImageRef, DynamicImageRef, GenericImageRef and
their owned counterparts, ImageOwned, DynamicImageOwned and GenericImageOwned.
Required Associated Types§
Required Methods§
Sourcefn debayer(&self, alg: DemosaicMethod) -> Result<Self::Output, BayerError>
fn debayer(&self, alg: DemosaicMethod) -> Result<Self::Output, BayerError>
Debayer the image.
This function returns an error if the image is not a Bayer pattern image.
§Arguments
alg: The demosaicing algorithm to use.
Possible algorithms are:
DemosaicMethod::None: No interpolation.DemosaicMethod::Nearest: Nearest neighbour interpolation.DemosaicMethod::Linear: Linear interpolation.DemosaicMethod::Cubic: Cubic interpolation.
§Errors
- If the image is not a Bayer pattern image.
- If the image is not a single channel image.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.