本文整理汇总了C++中FaceTracker::Start方法的典型用法代码示例。如果您正苦于以下问题:C++ FaceTracker::Start方法的具体用法?C++ FaceTracker::Start怎么用?C++ FaceTracker::Start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FaceTracker
的用法示例。
在下文中一共展示了FaceTracker::Start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
try
{
FaceTracker faceTracker;
faceTracker.Initialize();
faceTracker.Start(true);
FatigueDetection fatigueDetection;
int simpleCounter = 0;
int* IDPtr = faceTracker.GetIDs();
//std::cout << *IDPtr << std::endl;
;
for (;;) {
IDPtr = faceTracker.GetIDs();
if (simpleCounter % 15 == 0) {
/*fatigueDetection.DetectFatigue(faceTracker.GetPose());
fatigueDetection.DetectYawn(faceTracker.GetFaceFeatures());*/
std::cout << '#' << simpleCounter / 15;
int personNum = 0;
for (personNum; personNum < 6; personNum++) {
if (*(IDPtr + personNum) != -1) {
std::cout << "\t" << *(IDPtr + personNum) << '\t';
}
}
std::cout << std::endl;
if (faceTracker.FaceFound()) {
std::cout << faceTracker.GetFaceFeatures();
std::cout << "Is Yawning? : " << fatigueDetection.DetectYawn(faceTracker.GetFaceFeatures()) << std::endl;
}
else {
std::cout << "FACE NOT FOUND! >:(" << std::endl;
personNum = 0;
for (personNum; personNum < 6; personNum++) {
IDPtr[personNum] = -1;
}
}
std::cout << std::endl;
}
simpleCounter++;
if (cv::waitKey(33) == 'a')
{
break;
}
}
}
catch (FaceTrackerException& error)
{
std::cout << error.what() << std::endl;
}
return EXIT_SUCCESS;
}