1. An image processing device comprising: a memory configured to store a plurality of captured images; and a processor comprising hardware, wherein the processor is configured to: select a reference image from among the plurality of captured images stored in the memory; select candidate images to be combined with the reference image from a first group of images and a second group of images among the plurality of captured images, wherein the reference image is neither the earliest captured image nor the latest captured image stored in the memory, wherein: the first group of images is captured earlier than the reference image; and the second group of images is captured later than the reference image; and combine the candidate images with the reference image to generate a composite image, wherein the processor is configured to select the candidate images to be combined with the reference image by: selecting images from the first group of images and the second group of images in order from an image having a capture time closest to a capture time of the reference image to an image having a capture time farthest from the capture time of the reference image, and determining whether the images selected can be used as the candidate images to be combined with the reference image in the order in which the images from the first group of images and the second group of images are selected.