opencv 常用头文件介绍

opencv 常用头文件介绍
1.OpenCV包含的模块

cv – 核心函数库

cvaux – 辅助函数库

cxcore – 数据结构与线性代数库

highgui – GUI函数库

ml – 机器学习函数库

2.常用头文件:

#include <cv.h>

#include <cvaux.h>

#include <highgui.h>

#include <ml.h>

#include <cxcore.h>

  1. 头文件作用
    (1)cxcore.h

基础结构:CvPoint,CvSize,CvScalar 等。
数组操作:cvCreateImage,cvCreateMat 等。
动态结构:CVMemStorage,CvMemBlock 等。
绘图函数:cvLine,cvRectangle 等。
数据保存和运行时类型数据:CvFileStorage,cvOpenFileStorage. 等。
错误处理和系统函数: cvGetErrStatus,cvAlloc,cvFree 等。

(2)ml.h
机器学习模块, 基本上是统计模型和分类算法,包含如下内容
统计模型(Statistical Models)

一般贝叶斯分类器(Normal Bayes Classifier)

K-近邻(K-NearestNeighbors)

支持向量机(Support Vector Machines)

决策树(Decision Trees)

提升(Boosting)

梯度提高树(Gradient Boosted Trees)

随机树(Random Trees)

超随机树(Extremely randomized trees)

期望最大化(Expectation Maximization)

神经网络(Neural Networks)MLData

(2)cv.h

图像处理函数: cvSobel,cvCanny. 等。
结构分析:ContourArea 等。
运动分析和目标跟踪:cvMeanShift 等。
模式识别:cvHaarFeature 等。
摄像头定标与三维重建 等。

(3)HighGui

图形界面函数 cvNamedWindow 等。
图像保存和读取 cvLoadImage, cvSaveImage 等。
视频读写 CVCreateFileCapture 等。
opencv 常用头文件介绍