Installation and Operation of tld matlab program

Source: Internet
Author: User
Tags tld

 

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.