AKAZE fixes and tracking tutorial
This commit is contained in:
34
samples/cpp/tutorial_code/features2D/AKAZE_tracking/stats.h
Normal file
34
samples/cpp/tutorial_code/features2D/AKAZE_tracking/stats.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef STATS_H
|
||||
#define STATS_H
|
||||
|
||||
struct Stats
|
||||
{
|
||||
int matches;
|
||||
int inliers;
|
||||
double ratio;
|
||||
int keypoints;
|
||||
|
||||
Stats() : matches(0),
|
||||
inliers(0),
|
||||
ratio(0),
|
||||
keypoints(0)
|
||||
{}
|
||||
|
||||
Stats& operator+=(const Stats& op) {
|
||||
matches += op.matches;
|
||||
inliers += op.inliers;
|
||||
ratio += op.ratio;
|
||||
keypoints += op.keypoints;
|
||||
return *this;
|
||||
}
|
||||
Stats& operator/=(int num)
|
||||
{
|
||||
matches /= num;
|
||||
inliers /= num;
|
||||
ratio /= num;
|
||||
keypoints /= num;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // STATS_H
|
Reference in New Issue
Block a user