Anomaly monitoring of production line processing equipment based on machine vision is an important method for ensuring its efficient and stable operation. However, problems related to dynamic scenes, accidental and non-transcendental anomalies, image vulnerability to the severe vibrations of machining equipment, and difficulty in accepting the missing detection are significant obstacles to abnormality monitoring in the machining process. A periodic motion scene decomposition method is presented in this paper to solve dynamic scenes, occasional anomalies, severe vibrations, and other issues. Through optimization of the morphological structural elements, the feature points of the 'abnormality' region are obtained, and a Gaussian weighting formula is derived to detect the anomaly and improve the accuracy of detection. This method, which is verified by experiments, effectively overcomes problems related to the machining process and achieves good detection results.