TLD is tracking learning detection, the Code http://info.ee.surrey.ac.uk/Personal/Z.Kalal/tld.html that Zdenek kalal gives on its home page
Program configuration on my computer: win7 + vs2010 + MATLAB r2010a + opencv2.2 (or opencv2.3.1)
Opencv2.2 (which contains various versions of opencv) http://www.opencv.org.cn/index.php/Download
Step 1: Install opencv2.2 opencv and vs2010 installation tutorial address http://www.opencv.org.cn/index.p... E8 % A3 % 85opencv2. 4.3 (here opencv2.2 and opencv2.3.4 installation steps are the same)
Step 2: Start MATLAB r2010a, enter "Mex-setup" in the Command window, Press Y to enter the compiler selection, and enter the serial number of the vs2010 compiler.
Step 3: Set "complie. m "file opencv path original file path: Include = '-ic: \ opencv2.2 \ include \ opencv \-ic: \ opencv2.2 \ include \'; libpath = 'C: \ opencv2.2 \ Lib \';
My path is: Include = '-ie: \ opencv2.2 \ include \ opencv \-ie: \ opencv2.2 \ include \'; libpath = 'e: \ opencv2.2 \ Lib \';
Comment out: # ifdef _ char16_t in LK. cpp, Fern. cpp, bb_overlap.cpp.
# Define char16_t
# Endif
Step 4:Modify the code in the complie. M file
The solution is to open the LK. cpp file under the Mex file and find the 186 rows. Here you have carefully read this line.
Cvcalcopticalflowpyrlk (IMG [J], IMG [I], Pyr [J], Pyr [I], points [1], points [2], NPTS, cvsize (win_size, win_size), level,
0, 0, cvtermcriteria (cv_termcrit_iter | cv_termcrit_eps, 20, 0.03), bytes | cv_lkflow_pyr_a_ready | cv_lkflow_pyr_ B _ready );
Change the above-mentioned red 0 to status, as shown below:
Cvcalcopticalflowpyrlk (IMG [J], IMG [I], Pyr [J], Pyr [I], points [1], points [2], NPTS, cvsize (win_size, win_size), level,
Status, 0, cvtermcriteria (cv_termcrit_iter | cv_termcrit_eps, 20, 0.03), bytes | cv_lkflow_pyr_a_ready | cv_lkflow_pyr_ B _ready );
After modification, run the complete statement, and the previous work is completed successfully.
Step 5:Run run_tld.m, and a motorcycle tracking image will appear.