Esempio n. 1
0
 /// <summary>
 /// Creates a CSRT tracker
 /// </summary>
 /// <param name="useHog">Use hog</param>
 /// <param name="useColorNames">Use color names</param>
 /// <param name="useGray">Use Gray</param>
 /// <param name="useRgb">Use RGB</param>
 /// <param name="useChannelWeights">Use channel weights</param>
 /// <param name="useSegmentation">Use segmentation</param>
 /// <param name="windowFunction">Windows function</param>
 /// <param name="kaiserAlpha">Kaiser alpha</param>
 /// <param name="chebAttenuation">Cheb attenuation</param>
 /// <param name="templateSize">Template size</param>
 /// <param name="gslSigma">Gsl Sigma</param>
 /// <param name="hogOrientations">Hog orientations</param>
 /// <param name="hogClip">Hog clip</param>
 /// <param name="padding">padding</param>
 /// <param name="filterLr">filter Lr</param>
 /// <param name="weightsLr">weights Lr</param>
 /// <param name="numHogChannelsUsed">Number of hog channels used</param>
 /// <param name="admmIterations">Admm iterations</param>
 /// <param name="histogramBins">Histogram bins</param>
 /// <param name="histogramLr">Histogram Lr</param>
 /// <param name="backgroundRatio">Background ratio</param>
 /// <param name="numberOfScales">Number of scales</param>
 /// <param name="scaleSigmaFactor">Scale Sigma factor</param>
 /// <param name="scaleModelMaxArea">Scale Model Max Area</param>
 /// <param name="scaleLr">Scale Lr</param>
 /// <param name="scaleStep">Scale step</param>
 public TrackerCSRT(
     bool useHog             = true,
     bool useColorNames      = true,
     bool useGray            = true,
     bool useRgb             = false,
     bool useChannelWeights  = true,
     bool useSegmentation    = true,
     String windowFunction   = null,
     float kaiserAlpha       = 3.75f,
     float chebAttenuation   = 45,
     float templateSize      = 200,
     float gslSigma          = 1.0f,
     float hogOrientations   = 9,
     float hogClip           = 0.2f,
     float padding           = 3.0f,
     float filterLr          = 0.02f,
     float weightsLr         = 0.02f,
     int numHogChannelsUsed  = 18,
     int admmIterations      = 4,
     int histogramBins       = 16,
     float histogramLr       = 0.04f,
     int backgroundRatio     = 2,
     int numberOfScales      = 33,
     float scaleSigmaFactor  = 0.250f,
     float scaleModelMaxArea = 512.0f,
     float scaleLr           = 0.025f,
     float scaleStep         = 1.020f
     )
 {
     using (CvString csWindowFunction = new CvString(windowFunction))
         _ptr = TrackingInvoke.cveTrackerCSRTCreate(
             useHog,
             useColorNames,
             useGray,
             useRgb,
             useChannelWeights,
             useSegmentation,
             csWindowFunction,
             kaiserAlpha,
             chebAttenuation,
             templateSize,
             gslSigma,
             hogOrientations,
             hogClip,
             padding,
             filterLr,
             weightsLr,
             numHogChannelsUsed,
             admmIterations,
             histogramBins,
             histogramLr,
             backgroundRatio,
             numberOfScales,
             scaleSigmaFactor,
             scaleModelMaxArea,
             scaleLr,
             scaleStep,
             ref _trackerPtr,
             ref _sharedPtr);
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a KCF Tracker
 /// </summary>
 /// <param name="detectThresh">detection confidence threshold</param>
 /// <param name="sigma">gaussian kernel bandwidth</param>
 /// <param name="lambda">regularization</param>
 /// <param name="interpFactor">linear interpolation factor for adaptation</param>
 /// <param name="outputSigmaFactor">spatial bandwidth (proportional to target)</param>
 /// <param name="pcaLearningRate">compression learning rate</param>
 /// <param name="resize">activate the resize feature to improve the processing speed</param>
 /// <param name="splitCoeff">split the training coefficients into two matrices</param>
 /// <param name="wrapKernel">wrap around the kernel values</param>
 /// <param name="compressFeature">activate the pca method to compress the features</param>
 /// <param name="maxPatchSize">threshold for the ROI size</param>
 /// <param name="compressedSize">feature size after compression</param>
 /// <param name="descPca">compressed descriptors of TrackerKCF::MODE</param>
 /// <param name="descNpca">non-compressed descriptors of TrackerKCF::MODE</param>
 public TrackerKCF(
     float detectThresh      = 0.5f,
     float sigma             = 0.2f,
     float lambda            = 0.01f,
     float interpFactor      = 0.075f,
     float outputSigmaFactor = 1.0f / 16.0f,
     float pcaLearningRate   = 0.15f,
     bool resize             = true,
     bool splitCoeff         = true,
     bool wrapKernel         = false,
     bool compressFeature    = true,
     int maxPatchSize        = 80 *80,
     int compressedSize      = 2,
     Mode descPca            = Mode.Cn,
     Mode descNpca           = Mode.Gray)
 {
     _ptr = TrackingInvoke.cveTrackerKCFCreate(
         detectThresh,
         sigma,
         lambda,
         interpFactor,
         outputSigmaFactor,
         pcaLearningRate,
         resize,
         splitCoeff,
         wrapKernel,
         compressFeature,
         maxPatchSize,
         compressedSize,
         descPca,
         descNpca,
         ref _trackerPtr,
         ref _sharedPtr);
 }
Esempio n. 3
0
 /// <summary>
 /// Release the unmanaged resources associated with this tracker
 /// </summary>
 protected override void DisposeObject()
 {
     if (IntPtr.Zero != _ptr)
     {
         TrackingInvoke.cveTrackerCSRTRelease(ref _ptr, ref _sharedPtr);
     }
     base.DisposeObject();
 }