⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gmm.h

📁 动态场景中运动目标检测提取与跟踪 对新手很有用
💻 H
字号:
#ifndef GMM_H
#define GMM_H

#include "GM.h"
#include "cv.h"
#include "highgui.h"
#include <fstream.h>
/**
 *this implements the new GMM algorithm.
 */

#define    K               5
#define    T               0.7
#define    ALPHA_RGB       0.3

struct GMS
{
	GM gm[K];
};
class GMM
{
public:
	int height;
	int width;
	GMS* gmm;  
    IplImage* pImage;
	IplImage* pResultImage;
	char* originalImgMat;//3*height*width 大小
	char* resultImgMat;//同上
	CvCapture* pCapture;
	//char xt[3];
    int xt[3];

	
	
public:
	GMM(CvCapture* pCapture);
	~GMM();
	/**
	*find match of pixel xt
	*@param xt the current pixel
	*@param g the mixture models correspond to xt
	*return the location of the match if find, or return a number larger than K
	*/
	int findMatch(int* xt, GMS& g);
	// reorder the GMM using the parameter of w
	void reorderGMM(GMS& g);
	GM createNewGM(int* xt);
	void processImage();
	



};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -