www.pudn.com > colortracker.rar > cvHistWrapper.h


#ifndef __CVHISTWRAPPER_H__ 
#define __CVHISTWRAPPER_H__ 
 
#include "preprocessor.h" 
 
#include "C:\Program Files\OpenCV\cv\include\CV.hpp" 
#include "rimage.h" 
#include "MPImageWrapper.h" 
#include "MPKeyFrame.h" 
 
/* ================================================================ */ 
 
class cvHistWrapper : public CvCamShiftTracker 
{	 
private: 
	RImage m_log_back_project; 
	int m_histlookuptable[256]; 
	CvRect m_object; 
	bool m_expBoost; 
 
public: 
 
	cvHistWrapper() { 
		memset(m_histlookuptable, 0, sizeof(int)*256); 
		m_expBoost = false; 
		CvCamShiftTracker(); 
	} 
 
	void update_back_project(const IplImage* cur_frame); 
	void create_lookup_table(int *tab, CvHistogram* hist); 
	 
	RImage & get_log_back_project() { 
		return m_log_back_project; 
	} 
 
	bool update_histogram( const IplImage* cur_frame ); 
	 
	void process(MPImageWrapper & imageWrapper, const long int & frameNum, MPKeyFrameCollection *collection); 
 
	void set_expBoost(const bool val); 
}; 
 
/* ================================================================ */ 
 
#endif __CVHISTWRAPPER_H__