VAT  3.0
Video Analysis Tool
Public Member Functions | List of all members
CameraBuffer Class Reference

The CameraBuffer class is used to store captured frames from camera before use them. More...

#include <CameraThread.h>

Public Member Functions

 CameraBuffer (int n_frames)
 CameraBuffer constructor. More...
 
bool push (cv::Mat &frame, int time_stamp)
 Image frame insertion to the buffer method. More...
 
bool pop (cv::Mat &frame, int &time_stamp)
 Image frame recovery from the buffer method. More...
 
double usage ()
 Buffer occupation ratio method. More...
 

Detailed Description

The CameraBuffer class is used to store captured frames from camera before use them.

Constructor & Destructor Documentation

CameraBuffer::CameraBuffer ( int  n_frames)

CameraBuffer constructor.

Parameters
n_framesNumbers of frames that the buffer in creation will store as maximum.

CameraBuffer:

Member Function Documentation

bool CameraBuffer::pop ( cv::Mat &  frame,
int &  time_stamp 
)

Image frame recovery from the buffer method.

Parameters
frameMat parameter where image frame will be saved.
time_stampInteger parameter where image acquisition time identifier will be saved.
Returns
False if buffer is empty. True otherwise.
bool CameraBuffer::push ( cv::Mat &  frame,
int  time_stamp 
)

Image frame insertion to the buffer method.

Parameters
frameImage that was captured.
time_stampInteger identifier that allow to know acquirement sequence order.
Returns
Always true. If the buffer is full, the oldest frame is droped.
double CameraBuffer::usage ( )

Buffer occupation ratio method.

Returns
Floating point value between 0 and 1, This identify the buffer occupation ratio.

The documentation for this class was generated from the following files: