The invention discloses a workpiece apparent defect detection method based on machine vision. Firstly, a visual system is used for guiding a robot, the pose of a target workpiece is precisely positioned according to a template matching algorithm based on a gray value, and then workpiece apparent defect detection is carried out and comprises the steps that firstly, a workpiece image is acquired and pretreated through median filtering; secondly, the target workpiece is divided through a global threshold value, and workpiece pose correction is carried out; thirdly, burr interference of the edge of the workpiece is removed through mathematical morphology open operation; fourthly, notches, material sticking, cracking, indentation, needle eyes, scratches and foaming apparent defects are detected. The method solves the problems that the artificial detection speed is slow, the efficiency is low and precision is poor; the problems that according to current vision detection, defect types are singular, the imaging quality is poor, and the false drop rate is high are solved, and the automation degree of precise workpiece production and product quality are improved.