An imaging element of a vein imaging apparatus includes a vein image data generation region generating image data of a vein based a near-infrared light that was condensed by a lens array and that was scattered in a living body and transmitted through the vein and a positional displacement detection data generation region that includes a shielded section in which pixels are shielded from the light and an opening section in which pixels are not shielded from the light, and generates data for detecting positional displacement that is used to detect, based on the light received via the opening section, variation in an image focus position according to an imaging temperature. The vein imaging apparatus detects the image focus position of the light and estimates the amount of positional displacement occurred in the apparatus. The vein imaging apparatus selects a pixel based on the obtained amount of positional displacement.