自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(87)
  • 资源 (2)
  • 收藏
  • 关注

原创 opencv之clahe限制对比对自适应均衡之后检测车辆

代码展示#include <opencv2/opencv.hpp>#include <iostream>#include <string>#include <vector>using namespace std;using namespace cv;void Entrance(Mat car,string camName,CascadeClassifier& face_cascade);

2017-01-14 20:37:29 2687 2

原创 检测图片中的车辆并画出来,保存到指定文件夹

代码展示#include <opencv2/opencv.hpp>#include <iostream>#include <string>#include <vector>using namespace std;using namespace cv;void Entrance(Mat car,string camName,CascadeClassifier& face_cascade);

2017-01-14 17:11:54 854

原创 使用adaboost+haar分类器检测车辆demo

代码如下#include <iostream>#include <opencv2/opencv.hpp>#include <string>using namespace std;using namespace cv;CascadeClassifier car_classifier;string cascade_name = "car.xml";void detect_and_displa

2017-01-12 12:20:36 3568 3

原创 截取车辆正样本

demo主要功能由于前期的分类器正样本是包含大部分环境的图片,但是包含了正样本的具体位置,都写在了txt内,需要通过读txt文件把roi截取出来,本demo就是为此而做的。保存图片到指定的文件夹程序展示#include <opencv2/opencv.hpp>#include <iostream>#include <fstream>#include <string>#include <

2017-01-09 17:14:22 454

原创 去掉txt文件中每一行字符串内容的第一个空格

demo的作用在opencv训练分类器的时候,前期制作样本的时候,师弟们把样本的名字中带有了空格,但是训练的时候样本的名字是不能带有空格的。而样本的名字存储在一个txt文件夹中,所以需要修改txt文件中的样本名字。读写文件find字符串的空格位置查找空格删除空格代码展示#include <iostream>#include <string>#include <vector>#inc

2017-01-08 17:51:01 4040

原创 如何搜索海康相机的数量以及得到设备的IP等信息

实例演示#include <iostream> #include "Sadp.h"//#include <Windows.h>#include <vector>#include <opencv2/opencv.hpp>using namespace std;using namespace cv;#pragma comment(lib,"Sadp.lib")typedef struct

2017-01-07 15:15:25 5351 7

原创 如何遍历某一文件夹下所有图片并切割制作负样本

主要功能遍历某一文件夹下的所有文件得到某一文件夹下的所有文件名及全路径名切割单张图片得到多张图片并存储到指定文件夹自动根据文件夹下的文件名(不带扩展名)创建文件夹代码展示#include "cv.h"#include "highgui.h"#include <iostream>#include <string>#include<direct.h>//////创建文件夹的头文件#i

2017-01-06 00:44:58 1217

原创 boost之variant

variant的用法#include <iostream>#include <boost/typeof/typeof.hpp>#include <boost/variant.hpp>using namespace std;using namespace boost;int main(){ /////简单使用 variant<int, float, string>v;

2017-01-04 08:52:53 705

原创 boost之tuple

tuple的基本用法#include <iostream>#include <boost/typeof/typeof.hpp>#include <boost/assign.hpp>#include <boost/tuple/tuple.hpp>#include <boost/tuple/tuple_io.hpp>using namespace std;using namespace bo

2017-01-03 17:16:03 457

原创 boost之circular_buffer

circular_buffer#include <iostream>#include <boost/typeof/typeof.hpp>#include <boost/assign.hpp>#include <boost/circular_buffer.hpp>using namespace std;using namespace boost;template<typename T>v

2017-01-03 11:19:36 1488

原创 boost之bimap(3)

bimap#include <iostream>#include <boost/typeof/typeof.hpp>#include <boost/bimap.hpp>#include <boost/assign.hpp>using namespace std;using namespace boost;using namespace boost::assign;int main()

2017-01-03 10:04:17 295

原创 boost之bimap(2)

bimap#include <iostream>#include <boost/assign.hpp>#include <boost/typeof/typeof.hpp>#include <boost/bimap.hpp>#include <boost/bimap/list_of.hpp>#include <boost/bimap/unordered_multiset_of.hpp>#i

2017-01-02 23:01:10 419

原创 boost之bimap(1)

#include <iostream>#include <boost/assign.hpp>#include <boost/typeof/typeof.hpp>#include <boost/bimap.hpp>using namespace std;using namespace boost;int main(){ bimap<int, string>bm; ////

2017-01-02 21:57:23 361

原创 boost之unordered_map

unordered_map的使用#include <iostream>#include <boost/assign.hpp>#include <hash_map>#include <boost/unordered_map.hpp>#include <boost/typeof/typeof.hpp>using namespace std;using namespace boost;int

2017-01-02 20:06:58 3067

原创 boost之unordered_set

unordered_set的用法#include <iostream>#include <boost/unordered_set.hpp>#include <hash_set>#include <boost/assign.hpp>using namespace std;using namespace boost;template <typename T>void hash_func()

2017-01-02 19:50:31 504

原创 boost之dynamic_bitset

dynamic_bitset的使用#include <iostream>#include <boost/typeof/typeof.hpp>#include <boost/array.hpp>#include <boost/assign.hpp>#include <boost/dynamic_bitset.hpp>using namespace std;using namespace b

2017-01-02 19:34:56 2003

原创 opencv只操作不规则多边形roi

代码展示/**【1】得到不规则多边形的roi:* void get_multi_roi_invade(Mat& img,vector<Point>pt_vector);//////得到不规则多边形roi的区域*【2】从文件中读取不规则多边形roi的各个顶点坐标:*【3】得到roi,只对roi区域进行操作*/#include <opencv2/open

2016-12-27 21:39:36 5414

原创 如何读取一个文件夹下的所有图像文件,并制作负样本到指定目录

本项目的主要技术要点有以下几步如何读取文件夹下的所有文件如何把一副大图片切割成大小相等的多个小图片程序实现#include <opencv2/opencv.hpp>#include<iostream> #include<vector> #include <Windows.h> #include <fstream> #include <iterator> #includ

2016-12-20 19:07:21 1436

原创 c++11新特性之auto

auto的主要用处用于声明函数类型用于函数返回值用于for循环代码示例#include <iostream>#include <thread>#include <utility>#include <chrono>#include <atomic>#include <functional>using namespace std;auto main()->int//////auto

2016-12-12 15:07:07 344

转载 产生随机数的一些方法

c/c++特有的rand和srandc/c++rand和srand的使用opencv包含的opencv包含: RNG 、 randu( )、 randn() 、 randShuffle() 等

2016-12-08 16:25:20 358

原创 c++创建文件夹及其中的文件

代码展示#include <iostream>#include <direct.h>#include <fstream>#include <io.h>using namespace std;int main(){ if (_access(".\\testtmp", 0) == -1)/////文件夹不存在时候 { cout << "文件夹不存在的时候" <

2016-11-12 00:24:57 1357

原创 c++本程序如何调用执行另一个程序WinExce,ShellExecute,CreateProcess

自己的程序展示#include <iostream>#include <Windows.h>#include <ShellAPI.h>using namespace std;int main(){ //////打开另一个程序 //WinExec("E:/CProgram/test_all_main/x64/Release/test_all_main.exe",SW_SHOW

2016-11-11 22:29:10 954

原创 用两台usb摄像头摄取的画面找surf匹配点

核心知识点【1】opencv读取两个usb摄像机【2】surf特征点的寻找与匹配程序展示#include "opencv2/core/core.hpp"//#include "opencv2/features2d/features2d.hpp"#include "opencv2/highgui/highgui.hpp"#include <opencv2/nonfree/nonfree.h

2016-11-10 20:43:05 333

原创 opencv处理不规则多边形ROI 之二

相对于上一篇博客的功能扩充:opencv处理不规则多边形ROI的链接 ##【1】从文件中读取坐标点【2】对坐标点的个数没有限制【3】首先选取区域顶点的第一个和第二个顶点【4】自动对区域的上半部分进行像素值的变更(全为0或者255),只要我们有区域的坐标点集【5】自动对区域的下半部分进行像素值的变更(全为0或者255),只要我们有区域的坐标点集【6】坐标点集都放在了vector里代码展示

2016-11-10 17:29:02 6184

原创 vibe算法入侵检测,找轮廓,并且画轮廓

主程序#include "cv.h"#include "highgui.h"#include "originalVibe.h"#include<iostream>#include <vector>using namespace std;using namespace cv;Mat get_roi_mat_return(Mat src){ //Point root_points

2016-11-09 22:43:16 3387 1

原创 c++如何求任意多边形的面积

由于项目需要,求解任意不规则多边形的面积 ,想了很久,也不知道怎么叙述,直接代码展示吧#include <iostream>#include <vector>using namespace std; struct Point//////定义坐标结构体{ float x, y; }; float intAreaCalc(vector<Point> &ptVector)///

2016-11-09 19:26:36 9291 3

转载 OpenMP的循环使用实例展示

转载请声明出处http://blog.csdn.net/zhongkejingwang/article/details/40018735在C/C++中使用OpenMP优化代码方便又简单,代码中需要并行处理的往往是一些比较耗时的for循环,所以重点介绍一下OpenMP中for循环的应用。个人感觉只要掌握了文中讲的这些就足够了,如果想要学习OpenMP可以到网上查查资料。工欲善其事,必先利其器。如果还没

2016-11-08 15:51:47 1792 1

原创 opencv处理不规则多边形ROI

使用到的opencv函数fillpoly函数polylines函数程序实例#include <opencv2/opencv.hpp>#include <iostream>using namespace std;using namespace cv;int main(){ Mat img = imread("1.png"); Point root_points[1][6

2016-11-03 20:07:19 6190

原创 【STL】deque的常用方法

deque的常用方法预览【1】push_back【2】push_front【3】pop_back、pop_front【4】erase【5】insert【6】swap【7】clear【8】at【9】back【10】front【11】begin【12】end【13】cend【14】cbegin【15】rbegin【16】rend程序实例#include <iostrea

2016-09-04 13:05:56 1605

原创 【STL】list的常用方法

list的常用方法一览【1】insert【2】merge【3】splice【4】erase【5】remove【6】sort【7】reverse【8】swap【9】unique程序实例#include <iostream>#include <list>using namespace std;bool mysort(int x,int y){ return x>y;

2016-09-04 11:30:58 297

原创 【多线程】在显示屏上输出各种字符

程序功能【1】两个线程:一个线程的功能是按下键盘终止所有的线程执行;另一个线程是不断的向屏幕上输出字符【2】向屏幕上输出字符的线程,在显示的位置草果屏幕的是时候,要发出报警声音程序实例#include <iostream>#include <Windows.h>#include <process.h>#include <time.h>#include <stdlib.h>#inclu

2016-08-29 10:31:50 1262

原创 【笔试】 合唱团

有 n 个学生站成一排,每个学生有一个能力值,牛牛想从这 n 个学生中按照顺序选取 k 名学生,要求相邻两个学生的位置编号的差不超过 d,使得这 k 个学生的能力值的乘积最大,你能返回最大的乘积吗? 输入描述: 每个输入包含 1 个测试用例。每个测试数据的第一行包含一个整数 n (1 <= n <= 50),表示学生的个数,接下来的一行,包含 n 个整数,按顺序表示每个学生的能力值 ai(-5

2016-08-28 18:49:37 818 2

原创 【笔试】洗牌

[编程题]洗牌 洗牌在生活中十分常见,现在需要写一个程序模拟洗牌的过程。 现在需要洗2n张牌,从上到下依次是第1张,第2张,第3张一直到第2n张。首先,我们把这2n张牌分成两堆,左手拿着第1张到第n张(上半堆),右手拿 着第n+1张到第2n张(下半堆)。接着就开始洗牌的过程,先放下右手的最后一张牌,再放下左手的最后一张牌,接着放下右手的倒数第二张牌,再放下左手的 倒数第二张牌,直到最后放下左手的

2016-08-28 18:48:44 623

原创 【笔试】统计回文

“回文串”是一个正读和反读都一样的字符串,比如“level”或者“noon”等等就是回文串。花花非常喜欢这种拥有对称美的回文串,生日的时候她得到 两个礼物分别是字符串A和字符串B。现在她非常好奇有没有办法将字符串B插入字符串A使产生的字符串是一个回文串。你接受花花的请求,帮助她寻找有多少种 插入办法可以使新串是一个回文串。如果字符串B插入的位置不同就考虑为不一样的办法。 例如: A = “aba

2016-08-28 18:47:47 384

原创 【笔试】两种排序方法

考拉有n个字符串字符串,任意两个字符串长度都是不同的。考拉最近学习到有两种字符串的排序方法: 1.根据字符串的字典序排序。例如: “car” < “carriage” < “cats” < “doggies < “koala” 2.根据字符串的长度排序。例如: “car” < “cats” < “koala” < “doggies” < “carriage” 考拉想知道自己的这些字符串排列顺

2016-08-28 18:45:19 616

原创 [笔试] 分田地

牛牛和 15 个朋友来玩打土豪分田地的游戏,牛牛决定让你来分田地,地主的田地可以看成是一个矩形,每个位置有一个价值。分割田地的方法是横竖各切三刀,分成 16 份,作为领导干部,牛牛总是会选择其中总价值最小的一份田地, 作为牛牛最好的朋友,你希望牛牛取得的田地的价值和尽可能大,你知道这个值最大可以是多少吗? 输入描述: 每个输入包含 1 个测试用例。每个测试用例的第一行包含两个整数 n 和 m(

2016-08-28 18:44:38 1282 1

原创 【笔试】菲波那切数列应用

【2】 Fibonacci数列是这样定义的: F[0] = 0 F[1] = 1 for each i ≥ 2: F[i] = F[i-1] + F[i-2] 因此,Fibonacci数列就形如:0, 1, 1, 2, 3, 5, 8, 13, …,在Fibonacci数列中的数我们称为Fibonacci数。给你一个N,你想让其变为一个Fibonacci数,每一步你可以把当前数字X变 为X

2016-08-28 18:43:10 980

原创 [笔试]地域划分

现在有一块长条形的土地,这个土地我们可以看成是由n块小方格连接而成的(这些小方格我们可以将之编号为1到n)。而我们需要将其划分成两个部分,分别种上不同的作物(即作物A和B),划分必须在某两个小方格之间进行,或者在土地的最左端或最右端,若划分在第i块到第i+1块间进行,则划分后,第1至第i块地种A,剩下的地种B。现在有一些专家对土地进行了检测,他们每个人评估了每块土地适合种的作物。请你找到一个合适的划

2016-08-28 18:36:53 453

原创 【笔试】得到一个序列的全排列

怎么得到一个数列的全排列#include <iostream>#include <algorithm>#include <string>#include <vector>#include <iterator>using namespace std;int main(){string str;vector<string>strVec;int n;while(cin >> n){

2016-08-28 18:36:01 479

原创 【黑客大赛】前缀真前缀

(编程题) 对于两个字符串B和C,我们定义BC为将C接在B的后面形成的新串。一个字符串P是串A的前缀,当且仅当存在B使得A=PB,当然B可以为空串。若P!=A,则我们称P为A的真前缀。现在定义重复词。串Q是串A的重复词当且仅当Q是A的真前缀,且A是QQ的前缀。而A的最长重复词则是A的重复词中最长的一个,或者空串(当A没有任何重复串时)。如ababab的最长重复词是abab;abc的最长重复词是空串

2016-08-28 18:34:48 965

opencv处理不规则多边形roi

【1】opencv图像处理库 【2】处理不规则多边形roi的方法

2016-11-10

动态链接库dll

给出两个DLL的程序实例,并给出对应的测试程序,测试动态链接库的使用

2016-05-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除