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

Method data

rustcv-camera/src/frame.rs:119–121  ·  view source on GitHub ↗

Access the raw pixel data (zero-copy). 访问原始像素数据(零拷贝)。 The format of this data depends on [`pixel_format()`](Self::pixel_format): - `Mjpeg`: JPEG-compressed bytes (needs decoding) - `Yuyv`: YUYV 4:2:2 packed bytes (needs conversion) - `Bgr24`: Ready-to-use BGR pixels 数据格式取决于 [`pixel_format()`](Self::pixel_format): - `Mjpeg`:JPEG 压缩字节(需要解码) - `Yuyv`:YUYV 4:2:2 打包字节(需要转换) - `Bgr24`:可直接使用的 BGR 像素

(&self)

Source from the content-addressed store, hash-verified

117 /// - `Yuyv`:YUYV 4:2:2 打包字节(需要转换)
118 /// - `Bgr24`:可直接使用的 BGR 像素
119 pub fn data(&self) -> &[u8] {
120 self.data
121 }
122
123 /// Image width in pixels.
124 /// 图像宽度(像素)。

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected