Decode this frame into a BGR [`Mat`]. 将此帧解码为 BGR [`Mat`]。 This is a convenience method that allocates a new Mat. For zero-allocation decoding, use [`Camera::read_decoded()`] or [`VideoCapture::read()`] which reuse an existing Mat. 这是一个便捷方法,会分配新的 Mat。 如需零分配解码,请使用可复用现有 Mat 的 [`Camera::read_decoded()`] 或 [`VideoCapture::read()`]。
(&self)
| 184 | /// 如需零分配解码,请使用可复用现有 Mat 的 |
| 185 | /// [`Camera::read_decoded()`] 或 [`VideoCapture::read()`]。 |
| 186 | pub fn decode_bgr(&self) -> Result<Mat> { |
| 187 | let mut mat = Mat::new(); |
| 188 | crate::decode::decode_frame(self, &mut mat, None)?; |
| 189 | Ok(mat) |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | /// An owned frame with heap-allocated data. |
nothing calls this directly
no test coverage detected