fn sub_pixel(x: usize, p: &RGB, labels: &[ColorLabel], histogram: &mut [Bin]) {
    for (color, _label) in labels.iter() {
        if color == p {
            histogram[x].count = histogram[x].count.saturating_sub(1);
            return;
        }
    }
}
// Helper to subtract a row from the histogram.
Helper to subtract a row from the histogram.
Helper to subtract a row from the histogram .
fn sub_pixel(x: usize, p: &RGB, labels: &[ColorLabel], histogram: &mut [Bin]) {
    for (color, _label) in labels.iter() {
        if color == p {
            histogram[x].count = histogram[x].count.saturating_sub(1);
            return;
        }
    }
}
fn sub_pixel ( x : usize , p : & RGB , labels : & [ ColorLabel ] , histogram : & mut [ Bin ] ) { for ( color , _label ) in labels . iter ( ) { if color == p { histogram [ x ] . count = histogram [ x ] . count . saturating_sub ( 1 ) ; return ; } } }
Helper to subtract a row from the histogram.
Helper to subtract a row from the histogram .
x
usize
p
&RGB
labels
&[ColorLabel]
histogram
&mut [Bin]