本文整理汇总了C++中Tracker::FrameReset方法的典型用法代码示例。如果您正苦于以下问题:C++ Tracker::FrameReset方法的具体用法?C++ Tracker::FrameReset怎么用?C++ Tracker::FrameReset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker
的用法示例。
在下文中一共展示了Tracker::FrameReset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Track
dll void Track() {
if (capture.isOpened()) {
// start!
capture >> frame;
if (frame.total() == 0) return;
Mat img;
im = frame;
flip(im, im, 1); cvtColor(im, gray, CV_BGR2GRAY);
vector<int> wSize1(1);
vector<int> wSize2(3);
wSize1[0] = 7;
wSize2[0] = 11;
wSize2[1] = 9;
wSize2[2] = 7;
vector<int> wSize; if (failed)wSize = wSize2; else wSize = wSize1;
if (tracker.Track(gray, wSize, fpd, nIter, clamp, fTol, show) == 0) {
int idx = tracker._clm.GetViewIdx(); failed = false;
img = im.clone();
if (show) { Draw(im, tracker._shape, con, tri, tracker._clm._visi[idx]); }
}
else {
if (show) { Mat R(im, cvRect(0, 0, 150, 50)); R = Scalar(0, 0, 255); }
tracker.FrameReset(); failed = true;
mp.FrameReset();
}
if (fnum >= 9) {
t1 = cvGetTickCount();
fps = 10.0 / ((double(t1 - t0) / cvGetTickFrequency()) / 1e+6);
t0 = t1; fnum = 0;
}
else fnum += 1;
if (mp.frame < 5) {
mp.Calibrate(tracker._shape);
mp.frame++;
}
if (mp.frame >= 5) {
mp.EyeOpenL(img, tracker._shape);
mp.EyeOpenR(img, tracker._shape);
mp.MouthOpen(img, tracker._shape);
mp.FaceRotation(tracker._shape);
mp.OutPutValues();
}
if (show) {
sprintf(sss, "%d frames/sec", (int)round(fps)); text = sss;
putText(im, text, Point(10, 20),
CV_FONT_HERSHEY_SIMPLEX, 0.5, CV_RGB(0, 0, 0));
imshow("TrackingInfo", im);
}
if (waitKey(1) >= 0);
}
示例2: ModelReset
dll void ModelReset() {
tracker.FrameReset();
mp.FrameReset();
}