With the coming of the era of intelligence, machine vision and machine learning has become a research hotspot in recent years[1]. As an advanced manufacturing technology at present, 3D printing has been maturely applied in aerospace, bio-medicine and other fields[2]. However, a defect such as extruder head blockage, filament break, height error, warping and cracking occurred during the 3D printing process directly affects the printing quality and even the printing success rate. It is an inevitable trend to develop on-line monitoring on the health status of 3D printing devices to achieve unmanned operation of 3D printing. Therefore, this paper proposes a research on the on-line monitoring and compensation algorithm of 3D printing based on machine vision, which is significant to promote the development of 3D printing technology.