A computer software product that includes a non-transitory storage medium readable by a processor, the non-transitory storage medium having stored thereon a set of instructions for performing control of an imaging device the instructions comprising:
- (a) a first set of instructions which, when loaded into main memory and executed by the processor, causes the processor to control, by a projection controller, an infrared projector to project a first infrared light having a first wavelength assigned to a first color of red, green, and blue wherein the first wavelength is at least 700 nm;
- (b) a second set of instructions which, when loaded into main memory and executed by the processor, causes the processor to image an object by an imaging unit in a state where the first infrared light is projected in at least part of one frame period so as to generate a first frame based on a first imaging signal;
- (c) a third set of instructions which, when loaded into main memory and executed by the processor, causes the processor to continue from the first set of instructions to control the infrared projector to project a second infrared light having a second wavelength assigned to a second color of red, green, and blue, wherein the second wavelength is at least 700 nm;
- (d) a fourth set of instructions which, when loaded into main memory and executed by the processor, causes the processor to image the object by the imaging unit in a state where the second infrared light is projected in at least part of the one frame period so as to generate a second frame based on a second imaging signal;
- (e) a fifth set of instructions which, when loaded into main memory and executed by the processor, causes the processor to continue from the third set of instructions to control the infrared projector to project a third infrared light having a third wavelength assigned to a third color of red, green, and blue, wherein the third wavelength is at least 700 nm;
- (f) a sixth set of instructions which, when loaded into main memory and executed by the processor, causes the processor to image the object by the imaging unit in a state where the third infrared light is projected in at least part of the one frame period so as to generate a third frame based on a third imaging signal;
- and
- (g) a seventh set of instructions which, when loaded into main memory and executed by the processor, causes the processor to synthesize the first to third frames to generate a frame of an image signal using an image processing unit,
- wherein an interval is set between a first timing and a second timing shorter than an interval between the first timing and a third timing, the first timing being a middle point of a period in which the second infrared light is projected, the second timing being a middle point of a period in which the first or third infrared light is projected, and the third timing being a middle point of the one frame period of the first or third frame, and
- wherein when the second timing is the middle point of the period in which the imaging unit is exposed in the state where the first infrared light is projected, the third timing is the middle point of the one frame period of the first frame, and when the second timing is the middle point of the period in which the imaging unit is exposed in the state where the third infrared light is projected, the third timing is the middle point of the one frame period of third frame.