很多客户拿到我们ZC-CLS381RGB全彩颜色传感器 后问 这个传感器怎么做白平衡校准? 今天就为大家解答一下。
1. 结构示意图:
绿色:PCB电路板
红色:白光LED
黑色:RGB传感器
黄色:导光柱
蓝色:TP盖板
2. 校准流程:
2-1:备妥白色或灰卡(RBG数值相同)当做校准标准件
2-2:将白色或灰卡紧贴TP盖板
2-3:软件读取RGB Rawdata
2-4:取G Rawdata为参考点,将R/B校准至G相同数值的系数存到EEPROM or
flash内.即完成校准动作.
3. 参考作法:
void init()
{
R_factor = 1;
B_factor = 1;
}
Void RGB_read()
{
R= Read R chanel rawdata * R_factor;
G= Read G chanel rawdata;
B= Read B chanel rawdata * B_factor;
}
Void Calibration_R_B_factor()
{
R= Read R chanel rawdata ;
G= Read G chanel rawdata;
B= Read B chanel rawdata ;
R_factor = G/R;
B_factor = G/B; ----> write to EEPROM or flash
}