MCPcopy Create free account
hub / github.com/RustCV/RustCV / Mat

Class Mat

rustcv/src/core/mat.rs:6–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4/// Owns its data (Vec<u8>) and supports strided memory layout.
5#[derive(Clone)]
6pub struct Mat {
7 pub data: Vec<u8>,
8 pub rows: i32,
9 pub cols: i32,
10 /// 每一行占用的字节数 (Stride)
11 /// 对于 Packed 图像,step = cols * channels
12 /// 对于 Padded 图像,step > cols * channels
13 pub step: usize,
14 pub channels: u8,
15}
16
17impl Mat {
18 pub fn new(rows: i32, cols: i32, channels: u8) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected