1. An image processing apparatus comprising: an extracting unit that extracts pixel blocks from image data; a representative-image generating unit i) that aligns each center of gravity of each extracted pixel block, (ii) that calculates a binary value for each extracted pixel block whose center of gravity is aligned to set a similarity between the extracted pixel blocks, and (iii) that generates representative images from the extracted pixel blocks based on the similarity; and a vector converting unit that converts the representative images generated by the representative-image generating unit into vector information.