opencv
有梦想的咸鱼_
知行合一
展开
-
多线程处理图片
使用了 thread 线程库// pthreadDemo.cpp : 定义控制台应用程序的入口点。//#include <stdio.h>#include <pthread.h>#include <assert.h>#include <string>#include <opencv2/opencv.hpp>using n...转载 2019-12-11 21:46:42 · 605 阅读 · 0 评论 -
用opencv中HOGDescriptor类 实现简单行人检测
完整可运行代码如下#include <opencv2/core/core.hpp>#include <opencv2/highgui/highgui.hpp>#include <opencv2/objdetect.hpp>#include "opencv2/imgproc/imgproc.hpp"#include <stdio.h>usi...原创 2019-11-03 16:52:45 · 787 阅读 · 0 评论 -
霍夫圆变换代码实现
#include "opencv2/highgui/highgui.hpp"#include "opencv2/imgproc/imgproc.hpp"#include <iostream>#include <stdio.h>#include <vector>using namespace cv;using namespace std;/** @f...原创 2019-10-15 19:30:03 · 379 阅读 · 0 评论 -
为什么opencv使用BGR通道
一篇很有意思的博文博文地址.文中作者在一个大会上问了OpenCV的作者为什么使用BGR格式而不是使用RGB。最后得到答案就是因为历史原因。当时的BGR很流行,虽然我们现在RGB很流行,但opencv依然保持原样,没有改。...原创 2019-09-06 17:28:32 · 703 阅读 · 0 评论 -
Ubuntu系统Opencv画图实现化学原子模型图
opencv画图实现化学原子模型图先放效果图宏定义#define WINDOW_WIDTH 600#define WINDOW_NAME1 "【绘制图1】"CMakeLists.txt文件配置cmake_minimum_required(VERSION 3.14)project(test1)set(CMAKE_CXX_STANDARD 14)add_executable(t...原创 2019-09-06 18:06:22 · 301 阅读 · 0 评论 -
Opencv中addWeighted()函数用法
void addWeighted(InputArray src1,double alpha,InputArray src2,double beta,double gamma,OutputArray dst,int dytpe=-1)第一个参数,InputArray类型的src1,表示需要加权的第一个数组,填一个Mat。第二个参数,double类型的alpha,表示第一个数组的权重。第三...原创 2019-09-07 17:15:34 · 1423 阅读 · 0 评论 -
opencv图像线性滤波综合示例(方框,均值,高斯)
#include <opencv2/opencv.hpp>using namespace std;using namespace cv; //全局变量声明部分Mat g_srcImage, g_dstImage1, g_dstImage2, g_dstImage3;//存储图片的Mat类型int g_nBoxFilterValue = 3;//方框滤波参数值int g_n...转载 2019-09-08 19:50:09 · 115 阅读 · 0 评论