/
Alx89
/
OpenCV
Обзор
Документация
Войти
/
Alx89
/
OpenCV
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
4.x
samples/cpp/tutorial_code/features2D/AKAZE_tracking/stats.h
38 строк
665 B
Jiri Horner
tracking tutorial: add fps to stats
23 авг 2017, 11:40
23 авг 2017, 11:40
f6deaf5
Код
Авторство
О чём код?
#ifndef STATS_H #define STATS_H struct Stats { int matches; int inliers; double ratio; int keypoints; double fps; Stats() : matches(0), inliers(0), ratio(0), keypoints(0), fps(0.) {} Stats& operator+=(const Stats& op) { matches += op.matches; inliers += op.inliers; ratio += op.ratio; keypoints += op.keypoints; fps += op.fps; return *this; } Stats& operator/=(int num) { matches /= num; inliers /= num; ratio /= num; keypoints /= num; fps /= num; return *this; } }; #endif // STATS_H