Patent ID: 8902298

Claim:
A non-transitory computer-readable storage medium having stored therein an image display program for stereoscopically displaying a captured image on a stereoscopically-viewable stereoscopic display by displaying, in substantially a same display area, a right-eye image and a left-eye image by using a right captured image outputted from a right-eye real camera and a left captured image outputted from a left-eye real camera, wherein the image display program, when executed, causes a computer to at least: set a reference distance for a distance from the real cameras in an image-capturing direction, the setting of the reference distance comprising calculating a distance to a predetermined image-capture object, and setting the reference distance based on the calculated distance; display the right and left captured images in the display area so that a reference point common to the right and left captured images is displayed at a center of the display area, wherein the reference point is a point that is away from the real cameras by the reference distance in the image-capturing direction of the two real cameras on a straight line passing through a median point between the two real cameras and extending in the real camera image-capturing direction; set a right-eye virtual camera and a left-eye virtual camera in a virtual space; and stereoscopically display a virtual image by displaying in the display area a right virtual image obtained by capturing an image of the virtual space with the right-eye virtual camera and a left virtual image obtained by capturing an image of the virtual space with the left-eye virtual camera, wherein the left and right virtual images have a common virtual reference point and a projection matrix of the right virtual camera is set so that the virtual reference point in the right virtual image is displayed at the center of the display area and a projection matrix of the left virtual camera is set so that the virtual reference point in the left virtual image is displayed at the center of the display area, wherein the virtual reference point is a point that is away from the virtual cameras by a distance corresponding to the reference distance in an image-capturing direction of the two virtual cameras on a straight line passing through a median point between the two virtual cameras and extending in the virtual camera image-capturing direction, and wherein the image display program further causes the computer to recognize, using at least one of the right captured image and the left captured image, a position and an orientation of the predetermined image-capture object in the captured image so as to calculate position/orientation information representing a relative position and orientation relationship between the predetermined image-capture object and the real cameras, and to calculate a distance between the predetermined image-capture object and the real cameras based on the position/orientation information.