5 #include <opencv2/opencv.hpp> 6 #include <opencv/highgui.h> 15 #define CAMBUFFER_DROP_OLDEST 0 16 #define CAMBUFFER_DROP_NEWEST 1 39 bool push(cv::Mat &frame,
int time_stamp);
50 bool pop(cv::Mat &frame,
int &time_stamp);
73 #define BUFFER_SIZE 10 103 void setup(
int device_ID);
112 void setup(QString URL);
123 cv::Mat &get_frame(
int &time_stamp);
130 double buffer_usage();
141 cv::VideoCapture camera;
147 #endif // CAMERATHREAD_H bool push(cv::Mat &frame, int time_stamp)
Image frame insertion to the buffer method.
Definition: CameraThread.cpp:19
The CameraThread class is used as a Thread class to parallelly capture video frames from camera...
Definition: CameraThread.h:79
CameraBuffer(int n_frames)
CameraBuffer constructor.
Definition: CameraThread.cpp:9
double usage()
Buffer occupation ratio method.
Definition: CameraThread.cpp:53
bool pop(cv::Mat &frame, int &time_stamp)
Image frame recovery from the buffer method.
Definition: CameraThread.cpp:42
The CameraBuffer class is used to store captured frames from camera before use them.
Definition: CameraThread.h:21