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

Class Camera

rustcv-camera/src/camera.rs:39–47  ·  view source on GitHub ↗

A camera capture device with zero-copy frame access. 具有零拷贝帧访问能力的摄像头采集设备。 `Camera` wraps a platform-specific backend and provides: - [`next_frame()`](Self::next_frame): zero-copy frame borrowing mmap buffers - [`read_decoded()`](Self::read_decoded): decode into a reusable Mat - RAII buffer management (buffers auto-returned on frame drop) `Camera` 封装平台特定的后端并提供: - [`next_frame()`](Self::next_frame)

Source from the content-addressed store, hash-verified

37/// - [`read_decoded()`](Self::read_decoded):解码到可复用的 Mat
38/// - RAII 缓冲区管理(帧 drop 时自动归还缓冲区)
39pub struct Camera {
40 /// Platform-specific backend (V4L2 on Linux).
41 /// 平台特定后端(Linux 上为 V4L2)。
42 backend: backend::PlatformBackend,
43
44 /// The actual configuration negotiated with the driver.
45 /// 与驱动协商后的实际配置。
46 config: ResolvedConfig,
47}
48
49impl Camera {
50 /// Open a camera by device index (0 = first camera).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected