?? gmm.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 + -