OpenCV 4.5.3(日本語機械翻訳)
dpm.hpp
1 /*M///////////////////////////////////////////////////////////////////////////////////////
2 //
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 //
5 // By downloading, copying, installing or using the software you agree to this license.
6 // If you do not agree to this license, do not download, install,
7 // copy or use the software.
8 //
9 //
10 // License Agreement
11 // For Open Source Computer Vision Library
12 //
13 // Copyright (C) 2015, Itseez Inc, all rights reserved.
14 // Third party copyrights are property of their respective owners.
15 //
16 // Redistribution and use in source and binary forms, with or without modification,
17 // are permitted provided that the following conditions are met:
18 //
19 // * Redistribution's of source code must retain the above copyright notice,
20 // this list of conditions and the following disclaimer.
21 //
22 // * Redistribution's in binary form must reproduce the above copyright notice,
23 // this list of conditions and the following disclaimer in the documentation
24 // and/or other materials provided with the distribution.
25 //
26 // * The name of the copyright holders may not be used to endorse or promote products
27 // derived from this software without specific prior written permission.
28 //
29 // This software is provided by the copyright holders and contributors "as is" and
30 // any express or implied warranties, including, but not limited to, the implied
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 // In no event shall the Itseez Inc or contributors be liable for any direct,
33 // indirect, incidental, special, exemplary, or consequential damages
34 // (including, but not limited to, procurement of substitute goods or services;
35 // loss of use, data, or profits; or business interruption) however caused
36 // and on any theory of liability, whether in contract, strict liability,
37 // or tort (including negligence or otherwise) arising in any way out of
38 // the use of this software, even if advised of the possibility of such damage.
39 //
40 // Implementation authors:
41 // Jiaolong Xu - jiaolongxu@gmail.com
42 // Evgeniy Kozinov - evgeniy.kozinov@gmail.com
43 // Valentina Kustikova - valentina.kustikova@gmail.com
44 // Nikolai Zolotykh - Nikolai.Zolotykh@gmail.com
45 // Iosif Meyerov - meerov@vmk.unn.ru
46 // Alexey Polovinkin - polovinkin.alexey@gmail.com
47 //
48 //M*/
49
50 #ifndef __OPENCV_LATENTSVM_HPP__
51 #define __OPENCV_LATENTSVM_HPP__
52
53 #include "opencv2/core.hpp"
54
55 #include <map>
56 #include <vector>
57 #include <string>
58
93 namespace cv
94{
95
96 namespace dpm
97{
98
101
104 class CV_EXPORTS_W DPMDetector
105{
106 public:
107
108 struct CV_EXPORTS_W ObjectDetection
109 {
111 ObjectDetection( const Rect& rect, float score, int classID=-1 );
112 Rect rect;
113 float score;
114 int classID;
115 };
116
117 virtual bool isEmpty() const = 0;
118
124 virtual void detect(cv::Mat &image, CV_OUT std::vector<ObjectDetection> &objects) = 0;
125
129 virtual std::vector<std::string> const& getClassNames() const = 0;
130
133 virtual size_t getClassCount() const = 0;
134
142 static cv::Ptr<DPMDetector> create(std::vector<std::string> const &filenames,
143 std::vector<std::string> const &classNames = std::vector<std::string>());
144
145 virtual ~DPMDetector(){}
146};
147
149
150} // namespace dpm
151} // namespace cv
152
153 #endif
n-dimensional dense array class
Definition: mat.hpp:802
Template class for 2D rectangles
Definition: core/types.hpp:421
This is a C++ abstract class, it provides external user API to work with DPM.
Definition: dpm.hpp:105
virtual size_t getClassCount() const =0
Return a count of loaded models (classes).
virtual void detect(cv::Mat &image, CV_OUT std::vector< ObjectDetection > &objects)=0
Find rectangular regions in the given image that are likely to contain objects of loaded classes (mod...
static cv::Ptr< DPMDetector > create(std::vector< std::string > const &filenames, std::vector< std::string > const &classNames=std::vector< std::string >())
Load the trained models from given .xml files and return cv::Ptr<DPMDetector>.
virtual std::vector< std::string > const & getClassNames() const =0
Return the class (model) names that were passed in constructor or method load or extracted from model...
cv
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75
Definition: cvstd_wrapper.hpp:74
Definition: dpm.hpp:109