MCPcopy Create free account
hub / github.com/RoboMaster/RoboRTS / init

Method init

roborts_tracking/KCFcpp/src/kcftracker.cpp:161–171  ·  view source on GitHub ↗

Initialize tracker

Source from the content-addressed store, hash-verified

159
160// Initialize tracker
161void KCFTracker::init(const cv::Rect &roi, cv::Mat image)
162{
163 _roi = roi;
164 assert(roi.width >= 0 && roi.height >= 0);
165 _tmpl = getFeatures(image, 1);
166 _prob = createGaussianPeak(size_patch[0], size_patch[1]);
167 _alphaf = cv::Mat(size_patch[0], size_patch[1], CV_32FC2, float(0));
168 //_num = cv::Mat(size_patch[0], size_patch[1], CV_32FC2, float(0));
169 //_den = cv::Mat(size_patch[0], size_patch[1], CV_32FC2, float(0));
170 train(_tmpl, 1.0); // train with initial frame
171 }
172// Update position based on the new frame
173cv::Rect KCFTracker::update(cv::Mat image)
174{

Callers 2

mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 1

mainFunction · 0.64