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

Class Mat

rustcv-camera/src/mat.rs:20–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18/// 已解码的 BGR 图像。
19#[derive(Debug, Clone)]
20pub struct Mat {
21 /// Raw BGR pixel data. Layout: `[B, G, R, B, G, R, ...]`.
22 /// 原始 BGR 像素数据。布局:`[B, G, R, B, G, R, ...]`。
23 pub(crate) data: Vec<u8>,
24
25 /// Number of rows (image height).
26 /// 行数(图像高度)。
27 pub(crate) rows: u32,
28
29 /// Number of columns (image width).
30 /// 列数(图像宽度)。
31 pub(crate) cols: u32,
32
33 /// Number of channels (always 3 for BGR).
34 /// 通道数(BGR 固定为 3)。
35 pub(crate) channels: u32,
36
37 /// Row step in bytes (cols * channels).
38 /// 行步长(字节)(cols * channels)。
39 pub(crate) step: usize,
40}
41
42impl Mat {
43 /// Create an empty Mat with no allocated data.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected