pub struct FrameHistogram {
pub timestamp: Duration,
pub r: [u32; 256],
pub g: [u32; 256],
pub b: [u32; 256],
pub luma: [u32; 256],
}Expand description
Per-channel color histogram for a single video frame.
Each array has 256 bins (one per 8-bit intensity level). For an N × M
frame the sum of any channel’s bins equals N × M.
Luma is computed as Y = 0.299 R + 0.587 G + 0.114 B (BT.601 coefficients).
Fields§
§timestamp: DurationPresentation timestamp of the sampled frame.
r: [u32; 256]Red-channel bin counts.
g: [u32; 256]Green-channel bin counts.
b: [u32; 256]Blue-channel bin counts.
luma: [u32; 256]Luma bin counts (BT.601 weighted average of R, G, B).
Trait Implementations§
Source§impl Clone for FrameHistogram
impl Clone for FrameHistogram
Source§fn clone(&self) -> FrameHistogram
fn clone(&self) -> FrameHistogram
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FrameHistogram
impl RefUnwindSafe for FrameHistogram
impl Send for FrameHistogram
impl Sync for FrameHistogram
impl Unpin for FrameHistogram
impl UnsafeUnpin for FrameHistogram
impl UnwindSafe for FrameHistogram
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more