123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- #ifndef __OPENCV_LATENTSVM_HPP__
- #define __OPENCV_LATENTSVM_HPP__
- #include "opencv2/core.hpp"
- #include <map>
- #include <vector>
- #include <string>
- namespace cv
- {
- namespace dpm
- {
- class CV_EXPORTS_W DPMDetector
- {
- public:
- struct CV_EXPORTS_W ObjectDetection
- {
- ObjectDetection();
- ObjectDetection( const Rect& rect, float score, int classID=-1 );
- Rect rect;
- float score;
- int classID;
- };
- virtual bool isEmpty() const = 0;
-
- virtual void detect(cv::Mat &image, CV_OUT std::vector<ObjectDetection> &objects) = 0;
-
- virtual std::vector<std::string> const& getClassNames() const = 0;
-
- virtual size_t getClassCount() const = 0;
-
- static cv::Ptr<DPMDetector> create(std::vector<std::string> const &filenames,
- std::vector<std::string> const &classNames = std::vector<std::string>());
- virtual ~DPMDetector(){}
- };
- }
- }
- #endif
|