当前位置:网站首页>AS7341光谱传感器测量色温color_temperature_学习笔记
AS7341光谱传感器测量色温color_temperature_学习笔记
2022-07-21 05:03:00 【LiangWF22】
AS7341简介
(1)其光谱响应定义在约 350nm 至 1000nm 的波长范围内,八个光学通道覆盖可见光谱,一个通道可用于测量近红外光(NIR),一个通道是没有滤光器的光电二极管(C)。近红外光通道与其他可见光通道组合可以提供周围环境光条件(光源)检测的信息。
(2)六个通道可以由独立的 16 位 ADC 并行处理,而其他通道通过多路复用器访问。
(3)该器件还集成了专用通道,可检测 50Hz 或 60Hz 的环境光闪烁,闪烁检测引擎还可以用于在外部计算其他闪烁频率时缓冲数据。
(4)该器件还可以通过引脚 GPIO 与外部信号同步。
(5)小尺寸和低功耗的光谱传感器。
测量原理
我们可以直接利用AMS 提供的传感器批量生产的修正数据和基于 CIE1931 的 XYZ 修正矩阵来计算色温,XYZ 修正矩阵如下表 2。CIE1931XYZ 基色系统中的 X、Y、Z 的值可依据下面计算公式(3):
CIE1931xyz颜色空间中的相对系数 x、y、z 可以采用如下公式(4)计算 :
色温计算公式:
色温检测函数
//需要参数:spectraNum[10]数组
//spectralNum[10],存放着F1-F8 and Clear,NIR的数据
int color_temperature(unsigned int *spectralNum)
{
float X,Y,Z,x,y,n,cdc;
X=0.39814*spectralNum[0]+ 1.29540*spectralNum[1]+ 0.36956*spectralNum[2]+ 0.10902*spectralNum[3]+ 0.71942*spectralNum[4]+ 1.78180*spectralNum[5]+ 1.10110*spectralNum[6] -0.03991*spectralNum[7] -0.27597*spectralNum[8] -0.02347*spectralNum[9];
Y=0.01396*spectralNum[0]+ 0.16748*spectralNum[1]+ 0.23538*spectralNum[2]+ 1.42750*spectralNum[3]+ 1.88670*spectralNum[4]+ 1.14200*spectralNum[5]+ 0.46497*spectralNum[6] -0.02702*spectralNum[7] -0.24468*spectralNum[8] -0.01993*spectralNum[9];
Z=1.95010*spectralNum[0]+ 6.45490*spectralNum[1]+ 2.78010*spectralNum[2]+ 0.18501*spectralNum[3]+ 0.15325*spectralNum[4]+ 0.09539*spectralNum[5]+ 0.10563*spectralNum[6]+ 0.08866*spectralNum[7] -0.61140*spectralNum[8] -0.00938*spectralNum[9];
x=X/(X+Y+Z);
y=Y/(X+Y+Z);
n=(x-0.3320)/(0.1858-y);
cdc=437*n*n*n+ 3601 *n*n +6831 *n+ 5517;
return (int)cdc;
}
参考文章
[1]王伟.AS7341光谱传感器的分析与研究[J].电子测试,2021(13):59-61.DOI:10.16520/j.cnki.1000-8519.2021.13.018.
边栏推荐
- Database connection failed
- 解决 zsh:command not found
- fastjson @JSONField format 不生效的原因
- Single project - Ruiji takeout
- One of the problems to solve the sorting order error of Oracle database query single table
- 类加载器及双亲委派机制
- markdown及IDEA快捷键
- In fastjason data type, there is a problem of $ref: "$.list[0]" when parsing jsonobject
- PyTorch基础知识
- Jd.com's popular architect growth manual is launched, and you deserve the architect aura
猜你喜欢
As editor sets the indent position of the code on the right side of fluent development
Wechat public number Development Access, Application for Test number for Local Development Using Wechat public Platform
数据库连接不上
Linux redis-6.2.6 stand alone deployment
Chart is code: build a new generation of graphics library in a coded way -- feekin
PyTorch基础模块和实践
Share the experience of big factories, come quickly
Flutter通过Geolocator定位插件获经纬度调用高德周边信息接口
Data consistency of Nacos registry cluster
Nacos-注册中心原理解析
随机推荐
Web.Config自定义类的读取
URL 和 URI
整合ssm框架的项目
FTP cannot create multi-level directories [circular creation problem]
Database design introduction to database system (Fifth Edition)
Jprofiler安装及使用教程
markdown及IDEA快捷键
Forms form validation
Flutter通过Geolocator定位插件获经纬度调用高德周边信息接口
Gaode map API obtains the surrounding information corresponding to the current location
RSA公私钥加密工具类
MySQL DQL (data query language) - common functions
高并发常用辅助类
Quartz创建定时任务(入门)
Data type map, empty string, empty key value and other judgment methods are the most detailed in the whole network
对项目优化之一:redis缓存数据库的安装与项目中使用,加强项目读取操作
Starfish OS: create a new paradigm of the meta universe with reality as the link
MySQL之DQL(数据查询语言)-常见关键字
JSON tool class
数据库设计 数据库系统概论(第五版)