Patent ID: 8107734

Claim:
An image processing apparatus comprising: a label storing section for storing sequentially, for each of a plurality of lines along a predetermined direction, information about labels, which were assigned to pixels according to binarization information about pixels by scanning pixels of a binary image obtained by binarizing an image in the predetermined direction; a coordinate value storing section for storing information about coordinate values of pixels assigned the same label in the binary image; and a controller capable of performing operations of: determining whether or not, in a current line among the plurality of lines, there is a pixel assigned the same label as a label assigned to a pixel contained in a line which was scanned immediately before the current line; when a determination is made that there is no pixel assigned the same label, calculating a feature point in a connected component of the image where pixels specified by the coordinate values and assigned the same label are connected together, based on the information about the coordinate values stored in said coordinate value storing section; calculating a feature vector representing a feature of the image based on the calculated feature point; and determining a similarity to a reference image based on the calculated feature vector, wherein the labels are assigned to the pixels according to binarization information about the respective pixels by: determining, for each current pixel of the binary image scanned in the predetermined direction, whether or not neighboring pixels adjacent to the current pixel in the current line and the line which was scanned immediately before the current line have been assigned a label; in the case where none of the neighboring pixels have been assigned a label, assigning a unused label to the current pixel; in the case where one or more of the neighboring pixels have been assigned the same label, assigning the same label to the current pixel; and in the case where one or more of the neighboring pixels have been assigned different labels, assigning an oldest label among the different labels to the current pixel.