1 Star 0 Fork 0

NJUPT-B523/Intelligent Traffic Violation Detection

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ipccamera.h 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
江斌 提交于 2021-08-22 15:41 . YDS 2019
#ifndef IPCCAMERA_H
#define IPCCAMERA_H
#include "rtspclient.h"
#include <functional>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <iostream>
#include <pthread.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <unistd.h>
#include <getopt.h>
#include <chrono>
#include "opencv2/opencv.hpp"
//#include "openai_io.hpp"
#include <rockchip/rockchip_mpp.h>
extern "C" {
#include <rockchip/rockchip_rga.h>
}
using namespace cv;
using namespace std;
class ipcCamera
{
private:
RockchipRga *rga;
MppDecoder *dec;
int recv_count = 0;
int dec_count = 0;
__u32 width;
__u32 height;
RgaRotate rotate;
__u32 cropx;
__u32 cropy;
__u32 cropw;
__u32 croph;
FILE *f_h264 = NULL;
FILE *f_nv12 = NULL;
FILE *f_rgb24 = NULL;
public:
ipcCamera(__u32 w, __u32 h, RgaRotate r, int V, int H, __u32 cx, __u32 cy, __u32 cw, __u32 ch);
~ipcCamera();
int init(DecodeType type);
#ifdef RTSP_DEMO_DEBUG
void saveToFile(FILE **fp, void *buf, size_t len, int count);
#endif
unsigned long microTime();
int enqueue(unsigned char *buf, size_t len);
DecFrame *dequeue(void);
void freeFrame(DecFrame *frame);
void rgaProcess(DecFrame *frame, __u32 dstFormat, Mat* mat);
void rgaConvertFormat(Mat src, Mat dst, __u32 srcFormat, __u32 dstFormat, __u32 width, __u32 height);
RgaBuffer *allocBuffer(__u32 v4l2Format, __u32 width, __u32 height);
void freeBuffer(RgaBuffer *buf);
void onStreamReceive(unsigned char *buf, size_t len);
};
#endif // IPCCAMERA_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/njupt-b523/intelligent-traffic-violation-detection.git
git@gitee.com:njupt-b523/intelligent-traffic-violation-detection.git
njupt-b523
intelligent-traffic-violation-detection
Intelligent Traffic Violation Detection
master

搜索帮助