Skip to main content

rgb_u8_to_nchw_f32

Function rgb_u8_to_nchw_f32 

Source
pub fn rgb_u8_to_nchw_f32(
    image: ImageView<'_, u8, 3>,
    width: usize,
    height: usize,
    interpolation: Interpolation,
    pad_value: [u8; 3],
    scale: f32,
    mean: [f32; 3],
    std: [f32; 3],
) -> VisionResult<(TensorBuffer, LetterboxTransform)>
Expand description

Letterboxes an RGB u8 image and packs it as contiguous NCHW f32 [1,3,H,W].