opencv学习笔记5:直方图与匹配

直方图基本数据结构:
typedef struct CvHistogram
{
int type;
CvArr* bins;
float thresh[CV_MAX_DIM][2];
float** thresh2;
CvMatND mat;
} CvHistogram;

CvHistogram* cvCreateHist( int dims, int* sizes, int type, float** ranges=NULL, int uniform=1 );
dims: 表示几维空间,即一般彩色图像是3通道的,dim=3;而灰度图是1通道的,dim=1; sizes: 有10个方块,即sizes=10; type:CV_HIST_ARRAY; float** ranges=NULL:范围。
cvSetHistBinRanges
cvClearHist
cvReleaseHist
cvMakeHistHeaderForArray

访问:
cvQueryHistValue_1D
cvQueryHistValue_2D
cvQueryHistValue_3D
cvQueryHistValue_nD
cvGetHistValue_1D
cvGetHistValue_2D
cvGetHistValue_3D
cvGetHistValue_nD

操作:
cvNormalizeHist
cvThreshHist
cvCopyHist
cvGetMinMaxHistValue
cvCalcHist

cvCompareHist

其他:
cvCalcEMD2 陆地移动距离
cvCalcBackProject 反向投影
cvCalcBackProjectPatch

模板匹配:
cvMatchTemplate

你可能感兴趣的:(Opencv,opencv学习笔记)