1. An image capturing apparatus, comprising: a casing having an opening; a light source arranged inside the casing; a sensor arranged inside the casing and configured to capture, through the opening, an image of an object positioned outside the casing while the light source is on, wherein the casing shades at least part of light emitted from the light source to an outside of the casing via the opening so that low-luminance regions are formed in the image; and processing circuitry configured to calculate a distance between the casing and the object, based on the image that has been captured by the sensor, the image including, within an image region of the object defined by the opening, a high-luminance region and the low-luminance regions located on outer sides of the high-luminance region.