随笔分类 - 图像分析库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 *...
阅读全文
摘要:参考http://blog.csdn.net/solomon1558/article/details/51967280 1安装cmake以及依赖库 2安装opencv 3.把opencv的so库加入到环境变量 4测试使用 备注:
阅读全文
摘要://肤色提取,skinArea为二值化肤色图像 void skinExtract(const Mat &frame, Mat &skinArea) { Mat YCbCr; vector planes; //转换为YCrCb颜色空间 cvtColor(frame, YCbCr, CV_RGB2YCrCb); //将多通道图像分离为多个单通道图像 split(YCbCr, pla...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:#include #include #include int main(int argc, char** argv) { std::string videoFile = "../test.avi"; cv::VideoCapture capture; capture.open(videoFile); ...
阅读全文
摘要://形态学腐蚀 cvErode(pDstImage,pDstImage,0,3); //形态学膨胀 cvDilate(pDstImage,pDstImage,0,4); //中值滤波 cvSmooth(pDstImage,pDstImage, CV_MEDIAN);//默认窗口大小为3*3 cvShowImage("vei",pDstImage);...
阅读全文
摘要:CvSeq* contour = NULL; double minarea = 100.0; double tmparea = 0.0; CFileDialog dlg(true); if (dlg.DoModal()==IDOK) { CvMemStorage* storage = cvCreateMemStorage(0); ...
阅读全文
摘要:cvAbs 计算数组中所有元素的绝对值 cvAbsDiff 计算两个数组差值的绝对值 cvAbsDiffs 计算数组和标量差值的绝对值 cvAdd 两个数组的元素级的加运算 cvAdds 一个数组和一个标量的元素级的相加运算 cvAddWeighted 两个数组的元素的加权相加运算(alpha融合)
阅读全文
摘要:#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...
阅读全文
摘要:#include "stdio.h"#include "string.h"#include "iostream"#include "opencv/cv.h"#include "opencv/cxcore.h"#include "opencv/cvaux.h"#include "opencv/high...
阅读全文
摘要:#include "stdio.h"#include "string.h"#include "iostream"#include "opencv/cv.h"#include "opencv/cxcore.h"#include "opencv/cvaux.h"#include "opencv/high...
阅读全文
摘要:注意: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...
阅读全文
摘要:Mat img;int color[111111];int main(){ VideoCapture video(0); if (!video.isOpened()) { return -1; } Mat img; Mat img1, img2, i...
阅读全文
摘要:#include "cv.h"#include "highgui.h"#include using namespace std;using namespace cv;int main(int argc, char* argv[]){ Mat src = imread("misaka.j...
阅读全文
摘要:void SkinRGB(IplImage* rgb, IplImage* _dst){ assert(rgb->nChannels == 3 && _dst->nChannels == 3); static const int R = 2; static const int G ...
阅读全文
摘要:Mat input_image;Mat output_mask;Mat output_image;void main(){ VideoCapture cam(0); if (!cam.isOpened()) return; namedWindow("input ima...
阅读全文
摘要:HSV皮肤检测// 进行肤色检测 void SkinDetect(IplImage* src, IplImage* dst){ // 创建图像头 IplImage* hsv = cvCreateImage(cvGetSize(src), IPL_DEPTH_8U, 3);//用...
阅读全文