The invention relates to the technical field of
visual detection, in particular to a size detection and identification method for a plastic workpiece. The method comprises the following steps of 1, sequentially moving the workpiece to a
station I and a
station II for carrying out
image acquisition; 2, performing spot detection
algorithm operation and circular detection
algorithm operation on an image acquired by the
station I, identifying and positioning the workpiece, and measuring the inner
diameter and the outer
diameter of the workpiece; 3, carrying out
line segment detection
algorithm operation and line-line measurement algorithm operation on an image acquired by the station II, identifying a
line segment formed by the upper surface and the lower surface of the workpiece and measuringthe height of a product; and 4, converting identified inner
diameter information, outer diameter information and height information of the workpiece into readable
data information to be output. The two stations are set; and each station only carries out size detection on the workpiece, so that the accuracy of detection and identification is effectively guaranteed, the
algorithm design difficultyis reduced, the
operation time of a
complex algorithm is shortened, and the production efficiency is improved.