With the continuous development of science and technology, intelligent surveillance technology using image processing and computer vision is also progressing. To improve the performance of target detection and tracking, an improved target tracking method is proposed, which uses a combination of the Canny operator and morphology for the detection part, and a Kalman filter extended Kernel Correlation Filter (KCF) tracking algorithm approach for the tracking part. First, a convolution kernel of 3×3\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$3\ imes 3$$\\end{document} is improved to a convolution kernel of 2×2\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$2\ imes 2$$\\end{document} in the traditional Canny algorithm, and the pixel gradient in the diagonal direction is increased. Secondly, a mathematical morphology theory of nonlinear filtering is applied to the Canny edge detection algorithm, and this method effectively improves the clarity of image edges. Finally, the extended kernel correlation filtering algorithm is applied to video surveillance and Online Object Tracking Benckmark2013 (OTB2013) datasets for testing. The experimental results show that the method proposed in this paper can accurately detect moving targets and the algorithm has good accuracy and success rate.