Skip to content

Commit e72e2a1

Browse files
committed
Merge pull request #352 from kurnianggoro:gsoc_final
2 parents abe59c3 + cb35f12 commit e72e2a1

File tree

2 files changed

+311
-149
lines changed

2 files changed

+311
-149
lines changed

modules/tracking/include/opencv2/tracking/tracker.hpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,11 @@ class CV_EXPORTS_W TrackerKCF : public Tracker
12041204
- "GRAY" -- Use grayscale values as the feature
12051205
- "CN" -- Color-names feature
12061206
*/
1207-
enum MODE {GRAY, CN, CN2};
1207+
enum MODE {
1208+
GRAY = (1u << 0),
1209+
CN = (1u << 1),
1210+
CUSTOM = (1u<<2)
1211+
};
12081212

12091213
struct CV_EXPORTS Params
12101214
{
@@ -1234,9 +1238,12 @@ class CV_EXPORTS_W TrackerKCF : public Tracker
12341238
bool compress_feature; //!< activate the pca method to compress the features
12351239
int max_patch_size; //!< threshold for the ROI size
12361240
int compressed_size; //!< feature size after compression
1237-
MODE descriptor; //!< descriptor type
1241+
unsigned int desc_pca; //!< compressed descriptors of TrackerKCF::MODE
1242+
unsigned int desc_npca; //!< non-compressed descriptors of TrackerKCF::MODE
12381243
};
12391244

1245+
virtual void setFeatureExtractor(void (*)(const Mat, const Rect, Mat&), bool pca_func = false);
1246+
12401247
/** @brief Constructor
12411248
@param parameters KCF parameters TrackerKCF::Params
12421249
*/
@@ -1355,8 +1362,8 @@ Rect2d CV_EXPORTS_W selectROI(Mat img, bool fromCenter = true);
13551362
Rect2d CV_EXPORTS_W selectROI(const std::string& windowName, Mat img, bool showCrossair = true, bool fromCenter = true);
13561363
void CV_EXPORTS_W selectROI(const std::string& windowName, Mat img, std::vector<Rect2d> & boundingBox, bool fromCenter = true);
13571364

1358-
//! @}
1359-
13601365
} /* namespace cv */
13611366

1367+
//! @}
1368+
13621369
#endif

0 commit comments

Comments
 (0)