Skip to main content

render_rgb8

Function render_rgb8 

Source
pub fn render_rgb8(
    width: usize,
    height: usize,
    background: u8,
    blobs: &[(f64, f64)],
    peak: f64,
    sigma: f64,
) -> Vec<u8> 
Expand description

Render a width x height RGB8 image of the same neutral-gray scene as render_mono8: every pixel’s three channels are set equal to the Mono8 value, so the content (background plus Gaussian blobs) is identical, just carried in a color pixel format. Stride equals width * 3.

This lets the sim backend produce color frames so the color recording path (e.g. the ffmpeg MP4 writer) can be exercised without camera hardware.