X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=src%2FDetector.h;h=edf875c71afdb73d1ba0f90c160fe421f46747c8;hb=0e3565052ce6db176c34c448a7368b463d318558;hp=a2c43cf05a8ec7c6b1d1bbae7e90ec9a6ed885da;hpb=642ffd9803b9be0439124d1aebe2780fcbabeb07;p=trackerpp.git diff --git a/src/Detector.h b/src/Detector.h index a2c43cf..edf875c 100644 --- a/src/Detector.h +++ b/src/Detector.h @@ -1,16 +1,37 @@ #ifndef _DETECTOR_H_ #define _DETECTOR_H_ + #include "VideoReader.h" +#include "SharedPtr.h" namespace suanzi { -class Detector -{ -public: - Detector(); - virtual ~Detector(); - void detect(cv::Mat& frame){}; -}; + struct Detection; + + TK_DECLARE_PTR(Detector); + class Detector + { + public: + Detector(); + virtual ~Detector(); + unsigned int detect(cv::Mat& frame, Detection* detections){return 1;} + }; + + struct Detection + { + // 检测目标的类型,目前只有一个类human,默认等于0。为以后可以检测的更多类别预留 + unsigned int object_type; + // 检测目标的分数,可以不填 + float score; + // 检测目标的坐标,包括物体中心的x、y坐标,物体的高和宽 + unsigned int center_x; + unsigned int center_y; + unsigned int height; + unsigned int width; + // 检测目标的特征向量 + unsigned int feature_size; + float * feature; + }; }