A non-transitory computer-readable recording medium recording a viewing distance estimation program for causing a computer to serve as a viewing distance estimation device which estimates a viewing distance between a target and an eye of a person, the program further causing the computer to serve as:
- an image acquisition part which acquires a first image captured by an image capturing device and including a face of the person who watches the target;
- an iris detection part which detects a size of an iris of the person from the first image;
- a pixel number calculation part which calculates a first value indicating a pixel number for the detected size of the iris;
- a resolution acquisition part which acquires a resolution of the first image;
- an actual dimension calculation part which calculates, based on the first value and a second value indicating a predetermined inherent dimension for the size of the iris, a third value indicating an actual dimension of one pixel;
- an estimation part which estimates a viewing distance corresponding to the resolution acquired by the resolution acquisition part and the third value calculated by the actual dimension calculation part, based on relational information representing a relation among the resolution, the third value, and the viewing distance;
- and
- an output part which outputs estimative information including the viewing distance estimated by the estimation part.