When the workpiece moves, the existing industrial machine vision tracking system has some problems, such as low accuracy, poor recognition effect and so on. In this paper, optimizing convolution neural network based on stochastic gradient descent is used for motion foreground segmentation and tracking object, to realize high-speed and high-precision of recognition of moving object. The hard triggered capture system ensures the time interval of the image sequence, and the improved position difference method realizes the accurate measurement of the speed of the moving object and feeds it back to the robot. Finally, the experiment is carried out on the vision-conveyor-robot experimental platform. The results show that the maximum tracking speed can reach 90 mm/s, and the tracking accuracy error is less than 1mm, which proves that this method not only has the characteristics of high reliability and good tracking accuracy, but also has practical promotion value.