PointsTracker::PointsTracker(const int numbers) : AbstractTracker(numbers)
{
_numberOfPoints = numbers;
- _distanceThresValue = sqrt(2.f);
+ _distanceThresValue = sqrt(2.f*(2.0f * 2.0f));
}
PointsTracker::~PointsTracker()
_filters[index]->update(point.x, point.y);
auto newPoint = _filters[index]->get();
- if (distanceValue({static_cast<float>(point.x), static_cast<float>(point.y)}, newPoint) <= _distanceThresValue) {
+ if (distanceValue({static_cast<float>(point.x), static_cast<float>(point.y)},
+ {static_cast<float>(_points[index].x), static_cast<float>(_points[index].y)}) <= _distanceThresValue) {
_filters[index]->update(_points[index].x, _points[index].y);
} else {
_points[index].x = static_cast<int>(get<0>(newPoint));
RectsTracker::RectsTracker(const int numbers) : AbstractTracker(numbers * 2)
{
_numberOfRects = numbers;
- _iouThresValue = 0.95;
+ _iouThresValue = 0.93;
}
RectsTracker::~RectsTracker()
auto newRB = _filters[filterIndex]->get();
filterIndex++;
- if (iouValue({rect.left, rect.top}, {rect.right, rect.bottom}, newLT, newRB) >= _iouThresValue) {
- SINGLEO_LOGI("iou: %.4f", iouValue({rect.left, rect.top}, {rect.right, rect.bottom}, newLT, newRB));
+ // if (iouValue({_rects[rectIndex].left, _rects[rectIndex].top},
+ // {_rects[rectIndex].right, _rects[rectIndex].bottom},
+ // newLT, newRB) >= _iouThresValue) {
+ if (iouValue({_rects[rectIndex].left, _rects[rectIndex].top},
+ {_rects[rectIndex].right, _rects[rectIndex].bottom},
+ { rect.left, rect.top},
+ { rect.right, rect.bottom}) >= _iouThresValue) {
+
filterIndex--;
filterIndex--;