Skip to main content

reinhard_normalize

Function reinhard_normalize 

Source
pub fn reinhard_normalize(
    rgb: &[u8],
    target: Option<LabStats>,
    out: &mut [u8],
) -> Result<LabStats, HistoError>
Expand description

Reinhard-normalize packed RGB8 toward target Lab stats (or H&E defaults if None).

out length ≥ rgb.len(). In-place is allowed if out and rgb alias the same slice only when they are the same buffer via separate non-overlapping paths — prefer distinct buffers.