diff --git a/modules/tracking/include/opencv2/tracking/tracker.hpp b/modules/tracking/include/opencv2/tracking/tracker.hpp index 94c832d95..8c755051a 100644 --- a/modules/tracking/include/opencv2/tracking/tracker.hpp +++ b/modules/tracking/include/opencv2/tracking/tracker.hpp @@ -1198,9 +1198,32 @@ class CV_EXPORTS_W TrackerTLD : public Tracker class CV_EXPORTS_W TrackerKCF : public Tracker { public: + /** + * \brief Feature type to be used in the tracking grayscale, colornames, compressed color-names + */ enum MODE {GRAY, CN, CN2}; + struct CV_EXPORTS Params { + /** + * \brief Constructor + * \param sigma bandwidth of the gaussian kernel + * \param lambda regularization coefficient + * \param interp_factor inear interpolation factor for model updating + * \param output_sigma_factor spatial bandwidth (proportional to target) + * \param pca_learning_rate learning rate of the compression method + * \param resize activate the resize feature to improve the processing speed + * \param split_coeff split the training coefficients into two matrices + * \param wrap_kernel wrap around the kernel values + * \param compressFeature activate pca method to compress the features + * \param max_patch_size threshold for the ROI size + * \param compressed_size feature size after compression + * \param descriptor descriptor type + * The modes available now: + - "GRAY" -- Use grayscale values as the feature + - "CN" -- Color-names feature + - "CN2" -- Compressed color-names feature + */ Params(); /** @@ -1219,17 +1242,17 @@ class CV_EXPORTS_W TrackerKCF : public Tracker double output_sigma_factor; //!< spatial bandwidth (proportional to target) double pca_learning_rate; //!< compression learning rate bool resize; //!< activate the resize feature to improve the processing speed - bool splitCoeff; //!< split the training coefficients into two matrices - bool wrapKernel; //!< wrap around the kernel values - bool compressFeature; //!< activate pca method to compress the features + bool split_coeff; //!< split the training coefficients into two matrices + bool wrap_kernel; //!< wrap around the kernel values + bool compress_feature; //!< activate pca method to compress the features int max_patch_size; //!< threshold for the ROI size int compressed_size; //!< feature size after compression MODE descriptor; //!< descriptor type }; /** @brief Constructor - @param parameters KCF parameters TrackerKCF::Params - */ + @param parameters KCF parameters TrackerKCF::Params + */ BOILERPLATE_CODE("KCF",TrackerKCF); }; diff --git a/modules/tracking/samples/kcf.cpp b/modules/tracking/samples/kcf.cpp index 7e0189507..2b403c695 100644 --- a/modules/tracking/samples/kcf.cpp +++ b/modules/tracking/samples/kcf.cpp @@ -1,6 +1,6 @@ /*---------------------------------------------- * Usage: - * example_tracking_kcf