A technique of characterizing histograms using unique serial code words for discrimination between look alike acceptable and unacceptable items. The histogram is processed by normalizing the captured histogram image pixels preferably to the largest pixel size image normally encountered. Thereafter the histogram is attributed. The preferred embodiment related to a gray scale histogram (as distinguished from a histogram relating to area, length, width, perimeter, or aspect ratio) and successively attributes each histogram into peak location, range of histogram, peak value, right of peak value, and a selected gray scale count. For each attribute, an arbitrary range of codes is generated to break the classification of each attribute into manageable two-digit code categories. These two-digit code categories are typically written to a serial look-up table opposite the actual histogram value and extracted from the look-up table in real time to create two-digit code words. The two-digit code words are in turn concatenated in real time to create a unique serial word out of the successive codes from each attribute of each individual histogram. In the case of product acceptance and rejection, the unique serial code words of acceptable product is nonredundantly written to a library with word recognition indicting acceptable product. In grading product, the unique serial code words are provided to identify the product or defect which can thereafter be summed or otherwise processed for generating the desired product grades.