简体   繁体   English

如何使用Android光级传感器检测光波长?

[英]How to use android light level sensor to detect light wavelength?

Most Android devices have a sensor that measures the ambient light level (illumination) in lx unit. 大多数Android设备都有一个传感器,用于测量lx单位的环境光照水平(照明)。 Is it possible to figure out that the existence of a specific wavelength in the light through the sensor? 是否有可能通过传感器发现光中存在特定波长?

As you probably already know, the white light itself is made of different wavelength lights eg blue light with specific wavelength range, red with another specific wavelength range and... .now is it possible that the sensor figures out that for example are the lights with the wavelength of >100nm and <200nm available in the incoming light? 正如您可能已经知道的那样,白光本身由不同波长的光组成,例如具有特定波长范围的蓝光,具有另一特定波长范围的红光......以及传感器可能会发现例如是灯光入射光波长> 100nm且<200nm?

Taken from this answer (by Noah Witherspoon): 取自这个答案(Noah Witherspoon):

The camera chip converts a given wavelength of light into a signal by overlaying colored filters—red, green, and blue—onto subpixel sensors that are sensitive to a broad range of wavelengths. 相机芯片通过将彩色滤光片(红色,绿色和蓝色)叠加到对宽波长范围敏感的子像素传感器上,将给定波长的光转换为信号。 As such, the camera isn't actually sensing the wavelength; 因此,相机实际上并不感测波长; it's sensing the relative strength of the light at a couple of key peak wavelengths. 它可以感知几个关键峰值波长的光的相对强度。 As described in this answer, you can approximate the peak wavelength of a given RGB color by converting it to HSV (hue/saturation/value) and then interpolate from violet to red wavelengths by the hue component. 如本回答所述,您可以通过将其转换为HSV(色调/饱和度/值)然后通过色调分量从紫色到红色波长进行插值来近似给定RGB颜色的峰值波长。

The answer he is referring to is this one: How to get the wavelength of a pixel using RGB? 他所指的答案是: 如何使用RGB获取像素的波长?

The answer is No. The ambient light sensor has a very wide pass band. 答案是否定的。环境光传感器具有非常宽的通带。 You would have to use an external narrow pass band filter to obtain a measurement of the colour frequency of which you are interested. 您必须使用外部窄带通滤波器来获得您感兴趣的色频的测量值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM