The invention discloses a bar material counting method comprising the following steps: contour tracking; calculating a minimum bounding circle; forming a template and counting. The method uses an adaptive minimum bounding circle to approach a rod material end face. Carrying out contour tracking for an original image so as to obtain a contour of a
binary image; calculating the minimum bounding circle so as to carry out polygonoun approximation; using the minimum bounding circle to identify the bar material end face, thus adaptively extracting a bar material end face
radius template. Adaptively obtaining the minimum bounding circle to approach the end face according to the end face no matter the size of the bar material end face, and an error is controlled to be + / -4%. The method uses the bar material end face
template matching strategy, and obtains the bar material end face template through iteration; an average
radius of the template is Avg, and iteration is carried out in a
steel bar end face bounding circle between 0.5*Avg and 1.5*Avg scope, thus effectively solving the bar material counting problems if the sizes of each bar material end face are not completely consistent in a whole bundle of bar materials, and precision can reach 99.5%.