A non-transitory computer-readable storage medium for storing an image compression program, the image compression program causing a processor to execute a process, the process comprising:
- executing first processing that includes acquiring image data of an image captured by an imaging device mounted to a vehicle;
- executing second processing that includes setting a segmented region in a reference image corresponding to an image to be compressed and encoded;
- executing third processing that includes enlarging the reference image so that a magnification rate of a segmented region including a periphery of the reference image is greater than a magnification rate of another segmented region including a center point of the reference image, the center point being a contact point of an optical axis of the image incident to the imaging device and an imaging element in the imaging device;
- executing fourth processing that includes generating a predictive image in accordance with the enlarged reference image;
- and
- executing fifth processing that includes compressing and encoding image data of the image to be encoded in accordance with the generated predictive image.