
opencv
晚归
勿以事小而不为
展开
-
运动物体检测
#include "opencv2/opencv.hpp"#include<iostream>using namespace std;using namespace cv;Mat MoveDetect(Mat frame1, Mat frame2){ Mat result = frame2.clone(); Mat gray1, gray2; cvtColor(fra...原创 2018-03-24 14:37:01 · 376 阅读 · 0 评论 -
OpenCV在图片中添加汉字
1.创建一个VS控制台工程,配置OpenCV(保证OpenCV可用);2.为该工程配置freetype:下载freetype源码包。编译相应的版本得到对应lib文件(debug、release;win32、X64),并配置(这里我用的是freetype28),其配置过程和OpenCV配置类似。(使用freetype时,要将C:\WINDOWS\Fonts下的某一中文字符库拷贝到工程目录中!!我用的...原创 2018-05-03 21:25:07 · 1488 阅读 · 0 评论 -
Ubuntu下CMake GUI
安装的前提是已经安装过cmake; # sudo apt-get install cmake 1.在Ubuntu中使用命令安装CMake GUI; # sudo apt-get install cmake-qt-gui 2.打开CMake GUI; # cmake-gui 3.具体用法跟Windows没有什么差别,也可以配合c++的一些辅助工具库使用;...原创 2018-10-22 16:49:43 · 5760 阅读 · 0 评论 -
Ubuntu16.04编译opencv3.1 CUDA9.0
1.官网下载opencv3.1.0源代码;https://github.com/opencv/opencv/archive/3.1.0.zip 2.修改cmake文件夹中的FindCUDA.cmake文件; (1)查找“unset(CUDA_nppi_LIBRARY CACHE)”; 替换为: unset(CUDA_nppial_LIBRARY CACHE) unset(CUDA...原创 2018-10-31 20:13:23 · 2014 阅读 · 0 评论 -
opencv图像拼接
#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2\imgproc\imgproc.hpp> #include <iostream> using namespace std; using namespace cv; i...原创 2018-10-27 14:31:50 · 980 阅读 · 0 评论 -
Opencv3.1.0加载一个网络图片URL
直接看代码: #include <iostream> #include <opencv2/opencv.hpp> int main() { cv::VideoCapture cap; cv::Mat image; std::string urlPath = "http://img3.imgtn.bdimg.com/it/u=3791078381...原创 2018-11-03 10:46:03 · 1567 阅读 · 0 评论