/* Passed to callback functions */ typedef struct CvUserdata //首先定义结构体 { CvHaarTrainingData* trainingData; CvIntHaarFeatures* haarFeatures; } CvUserdata; CV_INLINE CvUserdata cvUserdata( CvHaarTrainingData* trainingData, //定义函数 CvIntHaarFeatures* haarFeatures ); CV_INLINE CvUserdata cvUserdata( CvHaarTrainingData* trainingData, CvIntHaarFeatures* haarFeatures ) { CvUserdata userdata; userdata.trainingData = trainingData; //进行参数的传递 userdata.haarFeatures = haarFeatures; return userdata; }
时间: 2024-10-24 14:48:04