Motion target tracking method and system

The invention relates to the technical field of image processing and specifically provides a motion target tracking method and system. The method comprises: based on a first frame image in frame images of a tracked motion target, determining the centroid and size of a tracking window of the motion target; based on pixels of the motion target in the first frame image, determining a color probability distribution diagram of each frame image; based on the position of the motion target in each frame image, adjusting the size of the tracking window to obtain the size of the tracking window of each frame image; judging whether the size of the tracking window of each frame image is smaller than a preset tracking window size threshold or not; if yes, based on the color probability distribution diagram of each frame image, obtaining the centroid of the tracking window of each frame image; storing the centroid of the tracking window in each frame image; and drawing a motion track of the motion target on a preset background image. By drawing the track of the motion target and performing storage, an observer can observe the motion track of the motion target at any time, so that the time and labor are saved.