The invention relates to the field of machine vision, in particular to a printing machine vision online detection method. It solves the problems of poor real-time response, heavy labor, high labor intensity and low detection level of manual detection of printed defective products. The present invention uses the image scanning device to scan the image of the printed product line by line and transmit it to the controller of the printing machine. After image processing, it is compared with the data segment corresponding to the printed image file prestored in the vision controller. If there is inaccurate registration, For defects such as missing printing, ghosting, and color difference, the interface circuit of the machine vision controller outputs a fault signal to prompt the operator to dispose of it or feedback the fault code to the upper controller, and the upper controller performs the next step of control. The invention has fast detection response speed, high precision, real-time detection during the printing process, and avoids printing defective products to the greatest extent.