mirror of
https://gitcode.com/gh_mirrors/es/esp32-opencv.git
synced 2025-08-15 11:10:24 +08:00
39 lines
665 B
C
39 lines
665 B
C
#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
|