📄 activemodel.cc
字号:
/*************************************************************** * C++ source * * File : ActiveModel.cc * * Module : ActiveModel * * Author : Adam Baumberg * * Creation Date : Mon May 16 15:25:51 1994 * * Comments : * ***************************************************************/#include "ActiveModel.h"#include <stdlib.h> // for ISO 9899 rand()#include <math.h>#include "tracker_defines_types_and_helpers.h"#include "ProfileSet.h"#include "Image.h"#include "PCAclass.h"#include "NagMatrix.h"#include "Profile.h"#include "OcclusionHandler.h"#include "EdgeDetector.h"#include "NagMatrix.h"#include "KalmanFilterOneD.h"#include "SplineWeights.h"#include "EnvParameter.h"#include "RGB32Image.h"#include "default_pca_model.h"#include "MotionDetector.h"#include "ActiveShapeTracker.h"#include "OcclusionImage.h"#ifdef DEBUG#ifndef NO_DISPLAY#include "os_specific_things.h" // for usleep()#endif#include "MovieStore.h"#endif // ifdef DEBUGnamespace ReadingPeopleTracker{// definition and initialisation of static member variables// apart from shape there's ox, oy, ax, ayconst int ActiveModel::NO_OF_NON_SHAPE_PARAMS = 4;#ifdef DEBUGMovieStore *ActiveModel::demo_movie = NULL;EnvStringParameter ActiveModel::demo_movie_name("DEMO_MOVIE_NAME");RGB32Image *ActiveModel::demo_image = NULL;#endif // ifdef DEBUGActiveModel::ActiveModel(ActiveShapeTracker *the_tracker, ImageType the_video_image_type) : P(), H(), N(), evals(), mean_points(0), mean_normals(0){ assert (the_tracker != NULL); // we need it tracker = the_tracker; video_image_type = the_video_image_type; // indicate that we have no images yet. These have to be set each frame! video_image = NULL; difference_image = NULL; background_image = NULL; previous_video_image = NULL; epsilon = 0.0; // overweighting parameter: no overweighting for now. // set up PCA model using configuration parameters from ActiveShapeTracker setup_pca_model();}void ActiveModel::setup_pca_model() // called once by constructor, sets up PCA model{ if (tracker->pca_model_filename != NULL) { ifstream tmpfile(tracker->pca_model_filename); if (!tmpfile) { cerror << " ActiveModel::setup(): cannot open PCA model file
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -