The invention discloses a seam tracking method based on liner laser imaging, and the seam tracking method comprises the following steps of step1, equipment calibration: adjusting a linear laser source generator, adjusting the position of a welding gun, fixing a charge coupled device (CCD) camera right in front of the welding gun, collecting an image and transmitting the collected image to a computer; step 2, setting a template; step 3, setting an interesting area; step 4, carrying out the template matching and acquiring a position deviation of the center of a weld seam; step 5, if an image which is matched with the template is found, compensating the deviation of the position of the welding gun; step 6, returning to the step 3 if no image which is matched with the template is found; and step 7, stopping a motor if the finding times of the image which is matched with the template is greater than a set threshold value. Due to the adoption of the seam tracking method, the position of a seam can be precisely positioned in the welding position, the seam tracking accuracy and reliability can be improved, the method is applicable to the tracking of the seams in different shapes, and a purpose for automatically tracking the seam in the welding process can be realized.