1. A computer-readable storage medium storing an image processing program that causes a computer to execute a process comprising: acquiring the same object identification information included in a plurality of image data items by referring to a storage unit that stores each of the image data items, object identification information that identifies an object included in the image data item, and a location information item that identifies a location of the object in the image data item in association with one another; acquiring the location of the object identified by the acquired object identification information in each of the image data items by referring to the storage unit; computing a difference between the acquired location information items; comparing the difference between the location information items with a predetermined location threshold value; and determining whether the image data items are to be in the same group on the basis of a result of comparison of the difference between the location information items and the predetermined location threshold value.