initial commit

This commit is contained in:
bmy
2024-05-24 19:10:41 +08:00
commit d5c427258a
14 changed files with 3275 additions and 0 deletions

31
capture.h Normal file
View File

@@ -0,0 +1,31 @@
#ifndef _CAPTURE_H__
#define _CAPTURE_H__
#include <thread>
#include <iostream>
#include <opencv2/highgui.hpp>
#include <zmq.hpp>
class capture
{
public:
int index;
int port;
int width;
int height;
int fps;
bool status = false;
char zmq_bind_addr[40] = "tcp://*:";
std::thread *thread;
cv::VideoCapture *cap;
cv::Mat frame;
zmq::context_t *context;
zmq::socket_t *socket;
capture(int camera_index, int zmq_port, int width_set = 320, int height_set = 240, int fps_set = 20);
void start(void);
void run(void);
bool is_open(void);
};
#endif