|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once |
|
|
|
|
|
#include <glog/logging.h> |
|
|
|
|
|
#include <ctime> |
|
|
#include <memory> |
|
|
#include <set> |
|
|
#include <string> |
|
|
#include <utility> |
|
|
#include <vector> |
|
|
|
|
|
#include <opencv2/core/core.hpp> |
|
|
#include <opencv2/highgui/highgui.hpp> |
|
|
#include <opencv2/imgproc/imgproc.hpp> |
|
|
|
|
|
#include "include/utils.h" |
|
|
|
|
|
namespace PaddleDetection { |
|
|
|
|
|
|
|
|
cv::Scalar GetColor(int idx); |
|
|
|
|
|
|
|
|
cv::Mat VisualizeTrackResult(const cv::Mat& img, |
|
|
const MOTResult& results, |
|
|
const float fps, |
|
|
const int frame_id); |
|
|
|
|
|
|
|
|
void FlowStatistic(const MOTResult& results, |
|
|
const int frame_id, |
|
|
const int secs_interval, |
|
|
const bool do_entrance_counting, |
|
|
const int video_fps, |
|
|
const Rect entrance, |
|
|
std::set<int>* id_set, |
|
|
std::set<int>* interval_id_set, |
|
|
std::vector<int>* in_id_list, |
|
|
std::vector<int>* out_id_list, |
|
|
std::map<int, std::vector<float>>* prev_center, |
|
|
std::vector<std::string>* records); |
|
|
|
|
|
|
|
|
void SaveMOTResult(const MOTResult& results, |
|
|
const int frame_id, |
|
|
std::vector<std::string>* records); |
|
|
|
|
|
} |
|
|
|