随笔分类 -  图像分析库OpenCV

摘要:#include "stdio.h" #include "iostream" #include "opencv/cv.h" #include "opencv2/opencv.hpp" #include "basicOCR.h" #include "time.h" using namespace std; using namespace cv; void ImageRect(IplImage *... 阅读全文
posted @ 2016-12-15 18:17 一样菜 阅读(1928) 评论(0) 推荐(0) 编辑
摘要:参考http://blog.csdn.net/solomon1558/article/details/51967280 1安装cmake以及依赖库 2安装opencv 3.把opencv的so库加入到环境变量 4测试使用 备注: 阅读全文
posted @ 2016-11-29 18:32 一样菜 阅读(27328) 评论(0) 推荐(1) 编辑
摘要://肤色提取,skinArea为二值化肤色图像 void skinExtract(const Mat &frame, Mat &skinArea) { Mat YCbCr; vector planes; //转换为YCrCb颜色空间 cvtColor(frame, YCbCr, CV_RGB2YCrCb); //将多通道图像分离为多个单通道图像 split(YCbCr, pla... 阅读全文
posted @ 2016-10-10 18:24 一样菜 阅读(1175) 评论(0) 推荐(0) 编辑
摘要:卷积神经网络VS配置 阅读全文
posted @ 2016-09-28 13:48 一样菜 阅读(431) 评论(0) 推荐(0) 编辑
摘要:opencv_haartraining.exe -data xml -vec pos.vec -bg neg/neg.txt -w 20 -h 20 -mem 144 opencv_haartraining.exe -data xml/ -vec pos.vec -bg neg/neg.txt -nstages 4 -nsplits 1 -minhitrate 0.999 -maxfalsea... 阅读全文
posted @ 2016-09-28 13:46 一样菜 阅读(794) 评论(0) 推荐(0) 编辑
摘要:char *bgFile = "C:/C_Project/HandTraining/Debug/res/bg.jpg"; FILE *file = fopen(bgFile, "r"); if (file == NULL){ cout << "bg.jpg文件不存在..." << endl; return -1; } char *h... 阅读全文
posted @ 2016-09-06 11:56 一样菜 阅读(2697) 评论(0) 推荐(0) 编辑
摘要:#include #include #include int main(int argc, char** argv) { std::string videoFile = "../test.avi"; cv::VideoCapture capture; capture.open(videoFile); ... 阅读全文
posted @ 2016-03-31 19:09 一样菜 阅读(2266) 评论(0) 推荐(0) 编辑
摘要://形态学腐蚀 cvErode(pDstImage,pDstImage,0,3); //形态学膨胀 cvDilate(pDstImage,pDstImage,0,4); //中值滤波 cvSmooth(pDstImage,pDstImage, CV_MEDIAN);//默认窗口大小为3*3 cvShowImage("vei",pDstImage);... 阅读全文
posted @ 2016-03-31 16:16 一样菜 阅读(3383) 评论(0) 推荐(0) 编辑
摘要:CvSeq* contour = NULL; double minarea = 100.0; double tmparea = 0.0; CFileDialog dlg(true); if (dlg.DoModal()==IDOK) { CvMemStorage* storage = cvCreateMemStorage(0); ... 阅读全文
posted @ 2016-03-30 16:12 一样菜 阅读(13716) 评论(0) 推荐(0) 编辑
摘要:cvAbs 计算数组中所有元素的绝对值 cvAbsDiff 计算两个数组差值的绝对值 cvAbsDiffs 计算数组和标量差值的绝对值 cvAdd 两个数组的元素级的加运算 cvAdds 一个数组和一个标量的元素级的相加运算 cvAddWeighted 两个数组的元素的加权相加运算(alpha融合) 阅读全文
posted @ 2016-03-30 16:00 一样菜 阅读(1489) 评论(0) 推荐(0) 编辑
摘要:#include "iostream" #include "queue" #include "Windows.h" #include #include "opencv2/opencv.hpp" #include "Windows.h" #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #includ... 阅读全文
posted @ 2016-03-30 15:50 一样菜 阅读(9598) 评论(0) 推荐(0) 编辑
摘要:、、 阅读全文
posted @ 2016-01-13 18:43 一样菜 阅读(742) 评论(0) 推荐(0) 编辑
摘要:#include "stdio.h"#include "string.h"#include "iostream"#include "opencv/cv.h"#include "opencv/cxcore.h"#include "opencv/cvaux.h"#include "opencv/high... 阅读全文
posted @ 2015-12-30 16:12 一样菜 阅读(4661) 评论(0) 推荐(0) 编辑
摘要:#include "stdio.h"#include "string.h"#include "iostream"#include "opencv/cv.h"#include "opencv/cxcore.h"#include "opencv/cvaux.h"#include "opencv/high... 阅读全文
posted @ 2015-12-30 16:05 一样菜 阅读(1963) 评论(0) 推荐(0) 编辑
摘要:注意:opencv-2.4.10#include "stdio.h"#include "string.h"#include "iostream"#include "opencv/cv.h"#include "opencv/cxcore.h"#include "opencv/highgui.h"#in... 阅读全文
posted @ 2015-12-23 15:54 一样菜 阅读(6318) 评论(0) 推荐(0) 编辑
摘要:Mat img;int color[111111];int main(){ VideoCapture video(0); if (!video.isOpened()) { return -1; } Mat img; Mat img1, img2, i... 阅读全文
posted @ 2015-12-17 15:31 一样菜 阅读(1460) 评论(0) 推荐(0) 编辑
摘要:#include "cv.h"#include "highgui.h"#include using namespace std;using namespace cv;int main(int argc, char* argv[]){ Mat src = imread("misaka.j... 阅读全文
posted @ 2015-12-17 14:58 一样菜 阅读(845) 评论(0) 推荐(0) 编辑
摘要:void SkinRGB(IplImage* rgb, IplImage* _dst){ assert(rgb->nChannels == 3 && _dst->nChannels == 3); static const int R = 2; static const int G ... 阅读全文
posted @ 2015-12-04 18:35 一样菜 阅读(610) 评论(0) 推荐(0) 编辑
摘要:Mat input_image;Mat output_mask;Mat output_image;void main(){ VideoCapture cam(0); if (!cam.isOpened()) return; namedWindow("input ima... 阅读全文
posted @ 2015-12-04 18:32 一样菜 阅读(1323) 评论(0) 推荐(0) 编辑
摘要:HSV皮肤检测// 进行肤色检测 void SkinDetect(IplImage* src, IplImage* dst){ // 创建图像头 IplImage* hsv = cvCreateImage(cvGetSize(src), IPL_DEPTH_8U, 3);//用... 阅读全文
posted @ 2015-12-04 18:31 一样菜 阅读(1130) 评论(0) 推荐(0) 编辑