The invention discloses a method for positioning and identifying a
laser character of a beer
bottle cap, which comprises the following steps: step 1, character positioning which comprises coarse positioning and fine positioning, that is, carrying out binaryzation,
corrosion expansion,
edge detection,
contour tracing and
Hough transform processing on a positioning character image, searching an angle between the straight lines on which two edges of the positioned character A are positioned, calculating a rotating angle of the character, searching coordinates of the center of the
bottle cap, translating the center of the
bottle cap to the center of an original
bottle cap image, aligning the
bottle cap image according to the calculated rotating angle of the character and repositioning the character; and step 2, character division and identification, wherein the character identification comprises the steps of extracting a 13 characteristic, extracting a protection statistical characteristic, extracting a coarse grid characteristic and finally carrying out matched identification on the character on the basis of the three character characteristics by utilizing a
template matching method. The method disclosed by the invention aims at the character image of the
bottle cap, which has a complex background and nonuniform illumination and implements the positioning on the
laser character of the beer bottle cap, which rotates at a random angle.