ZeroMQ通过Unix域套接字传送视频帧,OpenCV实时显示
进程间通信有几种常用方式:TCP/IP、Unix Socket、SHM(Share Memory) 以下代码示例是通过:ZeroMQ(zmq库)来通过Unix域套接字传送图像,OpenCV的imshow函数展示图像 两个重点:1. ZeroMQ的基本用法;2. 控制imsh…
进程间通信有几种常用方式:TCP/IP、Unix Socket、SHM(Share Memory) 以下代码示例是通过:ZeroMQ(zmq库)来通过Unix域套接字传送图像,OpenCV的imshow函数展示图像 两个重点:1. ZeroMQ的基本用法;2. 控制imsh…
查找并获取对应元素位置下标 #include <iostream> #include <vector> #include <algorithm> #include <iterator> #include <string> using namespace std; int main() { /****** …
用pytorch、darknet、dnn等实现的推理在转换为ncnn模型后,以官方给的示例代码为模板,推理出来的精度可能和原来差距较大,有如下可能原因: BGR和RGB的问题 其实就是训练时,通道顺序和推理时不一致,如下…
听说可以提高安全性 auto new_task = make_shared<DetectTask>(this, TaskId, CallParam, this); //左边为类指针 //或者 shared_ptr<DetectTask> new_task = make_shared<DetectTask>(this, Task…
#include "json.h" Json::Value jsobj; LOG_TRACE("rst:%s",outParam.toStyledString().c_str()); // 比较使用的用法,读配置文件 jsobj.get("GetDistance", false).asBool(); /…
struct timeval time; gettimeofday(&time, NULL); long start_time = time.tv_sec*1000 + time.tv_usec/1000; gettimeofday(&time, NULL); printf("推理之前time: %ld\n", (time.tv_sec*1000 +…
最简单的写法 main.cpp #include<iostream> void example_func() { // pass } int main() { example_func(); return 0; } 在A.cpp文件类写函数实现,B.cpp写声明,并在B中直接使用(不用exte…