Abstract:Aimed at the shortcomings of noise, inefficiency and damage in mechanical counting in printing and packaging industry, the paper counting algorithm based on local gray feature was designed with the effect of the algorithm verified by experiment. Based on column gray feature, the method could draw column pixel gray value curve, then column pixel gray was subtracted continuously for finding the transition point of paper spacing variations. Gray difference curve was subjected to binary processing; finally counting based on transition point was achieved. By eliminating interference points according to the paper width, the counting results were made more accurate. The experimental results showed that for paper with single texture and obvious gray difference, the method of counting achieved the ideal effect with high accuracy of up to 97%. As the algorithm was based upon the column gray by processing one-dimensional data, the running speed was fast with high efficiency, which could meet the requirement of real-time processing.