1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

tracking tutorial: add fps to stats

This commit is contained in:
Jiri Horner
2017-08-22 12:56:52 +02:00
parent a835517049
commit f6deaf5f2a
3 changed files with 17 additions and 5 deletions
@@ -7,11 +7,13 @@ struct Stats
int inliers;
double ratio;
int keypoints;
double fps;
Stats() : matches(0),
inliers(0),
ratio(0),
keypoints(0)
keypoints(0),
fps(0.)
{}
Stats& operator+=(const Stats& op) {
@@ -19,6 +21,7 @@ struct Stats
inliers += op.inliers;
ratio += op.ratio;
keypoints += op.keypoints;
fps += op.fps;
return *this;
}
Stats& operator/=(int num)
@@ -27,6 +30,7 @@ struct Stats
inliers /= num;
ratio /= num;
keypoints /= num;
fps /= num;
return *this;
}
};