Closed awarebayes closed 2 years ago
Also it makes sense to use std::round instead of cast to int, because int discards obviously bigger 0.75 casting it to zero instead of one. When you analyze videos, (int) results in less temporal coherence and more 'flickering' of keypoints
#include <iostream>
#include <cmath>
int main() {
float x = 0.75;
std::cout << (int)x << " vs " << std::round(x) << std::endl;
return 0;
}
./main
0 vs 1
Simple fix for #147, just check array boundaries