Skip to main content

apply

Function apply 

Source
pub fn apply(
    ops: &[Opcode],
    img: &mut PlaneImage<'_>,
    cfa_period: usize,
    value_scale: f32,
    parallel: bool,
) -> Vec<&'static str>
Expand description

Apply pixel opcodes to img, whose samples are in the units the list expects (OpcodeList1: stored values; OpcodeList2: linear reference values in [0, 1]; OpcodeList3: demosaiced values). cfa_period is the CFA repeat (2 for Bayer) used by the bad-pixel opcodes; value_scale maps sample values to the 16-bit table/constant domain (1 for stored values, 65535 for normalised ones). Returns the names of opcodes that were not applied (geometric and unknown ones).