1. A method for obtaining information about an occupant in a compartment of a vehicle, comprising: mounting a light source in the vehicle; projecting structured light into an area of interest in the compartment where the occupant could be located, rays of light forming the structured light originating from the light source, the structured light being a pattern of light including a plurality of light areas and at least one dark area alongside one another; detecting reflected light at an image sensor arranged on the vehicle at a position different than the position from which the structured light is projected and at a position from which light reflected from any objects in the area of interest in the compartment is received; and analyzing the reflected light relative to the projected structured light to obtain information about the area of interest and the occupant when located in the area of interest.