1. An image processing apparatus comprising: a memory; an obtaining unit that obtains image data representing an image including concatenated pixels; an isolating unit that isolates a rendering element, the rendering element being an image surrounded by border lines of a color in an image represented by the image data; and a classifying unit that, in a case where a plurality of rendering elements has been isolated by the isolating unit, and in a case where color difference between two of the plural rendering elements or the distance between the two rendering elements is less than a threshold, classifies the two rendering elements into the same group, associates pieces of image data that represent rendering elements belonging to the same group with one another, and stores the pieces of image data in the memory.