OpenCV 4.5.3(日本語機械翻訳)
tracking.hpp
1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html.
4
5 #ifndef OPENCV_CONTRIB_TRACKING_HPP
6 #define OPENCV_CONTRIB_TRACKING_HPP
7
8 #include "opencv2/core.hpp"
9 #include "opencv2/video/tracking.hpp"
10
11 namespace cv {
12 #ifndef CV_DOXYGEN
13 inline namespace tracking {
14 #endif
15
34 class CV_EXPORTS_W TrackerCSRT : public Tracker
35{
36 protected:
37 TrackerCSRT(); // use ::create()
38 public:
39 virtual ~TrackerCSRT() CV_OVERRIDE;
40
41 struct CV_EXPORTS_W_SIMPLE Params
42 {
43 CV_WRAP Params();
44
45 CV_PROP_RW bool use_hog;
46 CV_PROP_RW bool use_color_names;
47 CV_PROP_RW bool use_gray;
48 CV_PROP_RW bool use_rgb;
49 CV_PROP_RW bool use_channel_weights;
50 CV_PROP_RW bool use_segmentation;
51
52 CV_PROP_RW std::string window_function;
53 CV_PROP_RW float kaiser_alpha;
54 CV_PROP_RW float cheb_attenuation;
55
56 CV_PROP_RW float template_size;
57 CV_PROP_RW float gsl_sigma;
58 CV_PROP_RW float hog_orientations;
59 CV_PROP_RW float hog_clip;
60 CV_PROP_RW float padding;
61 CV_PROP_RW float filter_lr;
62 CV_PROP_RW float weights_lr;
63 CV_PROP_RW int num_hog_channels_used;
64 CV_PROP_RW int admm_iterations;
65 CV_PROP_RW int histogram_bins;
66 CV_PROP_RW float histogram_lr;
67 CV_PROP_RW int background_ratio;
68 CV_PROP_RW int number_of_scales;
69 CV_PROP_RW float scale_sigma_factor;
70 CV_PROP_RW float scale_model_max_area;
71 CV_PROP_RW float scale_lr;
72 CV_PROP_RW float scale_step;
73
74 CV_PROP_RW float psr_threshold;
75 };
76
80 static CV_WRAP
82
83 //void init(InputArray image, const Rect& boundingBox) CV_OVERRIDE;
84 //bool update(InputArray image, CV_OUT Rect& boundingBox) CV_OVERRIDE;
85
86 CV_WRAP virtual void setInitialMask(InputArray mask) = 0;
87};
88
89
98 class CV_EXPORTS_W TrackerKCF : public Tracker
99{
100 protected:
101 TrackerKCF(); // use ::create()
102 public:
103 virtual ~TrackerKCF() CV_OVERRIDE;
104
111 enum MODE {
112 GRAY = (1 << 0),
113 CN = (1 << 1),
114 CUSTOM = (1 << 2)
115 };
116
117 struct CV_EXPORTS_W_SIMPLE Params
118 {
119 CV_WRAP Params();
120
121 CV_PROP_RW float detect_thresh;
122 CV_PROP_RW float sigma;
123 CV_PROP_RW float lambda;
124 CV_PROP_RW float interp_factor;
125 CV_PROP_RW float output_sigma_factor;
126 CV_PROP_RW float pca_learning_rate;
127 CV_PROP_RW bool resize;
128 CV_PROP_RW bool split_coeff;
129 CV_PROP_RW bool wrap_kernel;
130 CV_PROP_RW bool compress_feature;
131 CV_PROP_RW int max_patch_size;
132 CV_PROP_RW int compressed_size;
133 CV_PROP_RW int desc_pca;
134 CV_PROP_RW int desc_npca;
135 };
136
140 static CV_WRAP
142
143 //void init(InputArray image, const Rect& boundingBox) CV_OVERRIDE;
144 //bool update(InputArray image, CV_OUT Rect& boundingBox) CV_OVERRIDE;
145
146 // FIXIT use interface
147 typedef void (*FeatureExtractorCallbackFN)(const Mat, const Rect, Mat&);
148 virtual void setFeatureExtractor(FeatureExtractorCallbackFN callback, bool pca_func = false) = 0;
149};
150
151
153
154 #ifndef CV_DOXYGEN
155}
156 #endif
157} // namespace
158
159 #endif // OPENCV_CONTRIB_TRACKING_HPP
n-dimensional dense array class
Definition: mat.hpp:802
Template class for 2D rectangles
Definition: core/types.hpp:421
Base abstract class for the long-term tracker
Definition: video/tracking.hpp:714
the CSRT tracker
Definition: tracking.hpp:35
static CV_WRAP Ptr< TrackerCSRT > create(const TrackerCSRT::Params &parameters=TrackerCSRT::Params())
Create CSRT tracker instance
the KCF (Kernelized Correlation Filter) tracker
Definition: tracking.hpp:99
static CV_WRAP Ptr< TrackerKCF > create(const TrackerKCF::Params &parameters=TrackerKCF::Params())
Create KCF tracker instance
MODE
Feature type to be used in the tracking grayscale, colornames, compressed color-names The modes avail...
Definition: tracking.hpp:111
CV_EXPORTS_W void resize(InputArray src, OutputArray dst, Size dsize, double fx=0, double fy=0, int interpolation=INTER_LINEAR)
Resizes an image.
cv
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75
Definition: cvstd_wrapper.hpp:74
Definition: tracking.hpp:42
Definition: tracking.hpp:118