Detection device
A detection device includes a light source, and an optical sensor comprising a plurality of photodiodes configured to output pixel data corresponding to a light intensity irradiating the photodiodes. The optical sensor is configured to capture a first image containing a plurality of pieces of first pixel data and a second image that contains a plurality of pieces of second pixel data and is more sensitive than the first image, the second pixel data having a gradation equal to or smaller than a predetermined threshold is selected in the second image, the first pixel data in an area corresponding to a deselected second pixel data is selected in the first image, and a composite image is generated based on the selected second pixel data and the selected first pixel data.
1 . A detection device comprising:
a light source; and
an optical sensor comprising a plurality of photodiodes configured to output pixel data corresponding to a light intensity irradiating the photodiodes, wherein
the optical sensor is configured to capture a first image containing a plurality of pieces of first pixel data and a second image that contains a plurality of pieces of second pixel data and is more sensitive than the first image,
the second pixel data having a gradation equal to or smaller than a predetermined threshold is selected in the second image,
the first pixel data in an area corresponding to a deselected second pixel data is selected in the first image,
a composite image is generated based on the selected second pixel data and the selected first pixel data,
the light source comprises a first light source configured to emit red light, a second light source configured to emit green light, and a third light source configured to emit blue light,
the optical sensor is configured to capture the first image and the second image that correspond to each of the red light, the green light, and the blue light,
the detection device is configured to:
select the second pixel data corresponding to each of the red light, the green light, and the blue light; and
generate the composite image using composite pixel data obtained by multiplying the selected second pixel data corresponding to each of the red light, the green light, and the blue light by a predetermined conversion coefficient, and
the predetermined conversion coefficient is a value obtained as an average value of a conversion coefficient corresponding to the red light, a conversion coefficient corresponding to the green light, and a conversion coefficient corresponding to the blue light.
2 . The detection device according to claim 1 , wherein
the light source is configured to emit light at a first light intensity and the optical sensor is configured to capture the first image in response to the light at the first light intensity, in a first detection period, and
the light source is configured to emit light at a second light intensity larger than the first light intensity and the optical sensor is configured to capture the second image in response to the light at the second light intensity, in a second detection period.
3 . The detection device according to claim 2 , wherein the light at the second light intensity is greater than the light at the first light intensity in at least either of luminance and irradiation time of the light source.
4 . The detection device according to claim 1 , comprising:
an arithmetic circuit configured to select the second pixel data in the second image and select the first pixel data in the first image; and
an image generation circuit configured to generate the composite image, wherein the arithmetic circuit is configured to calculate composite pixel data by multiplying the selected second pixel data by the predetermined conversion coefficient, and
the image generation circuit is configured to generate the composite image based on the composite pixel data and the selected first pixel data.
5 . The detection device according to claim 1 , comprising a light-transmitting mounting substrate located between the light source and the optical sensor in order to mount an object to be detected.
6 . The detection device according to claim 1 , wherein the light source is a point light source.
7 . The detection device according to claim 1 , comprising a storage circuit configured to store luminance gradient data depending on a distance from the light source to each of the photodiodes, and
configured to correct luminance of the composite image based on the luminance gradient data.