M5Unit-COLOR 0.1.1 git rev:9de2836
Loading...
Searching...
No Matches
m5::unit::tcs3472x::Calibration Struct Reference

Raw value to determine black and white. More...

#include <unit_color_utility.hpp>

Public Member Functions

 Calibration (const uint16_t br, const uint16_t wr, const uint16_t bg, const uint16_t wg, const uint16_t bb, const uint16_t wb)
 
uint8_t R8 (const Data &d) const
 Get the red value with calibration.
 
uint8_t G8 (const Data &d) const
 Get the green value with calibration.
 
uint8_t B8 (const Data &d) const
 Get the blue value with calibration.
 

Static Public Member Functions

static uint8_t linear (const uint16_t raw, const uint16_t low, const uint16_t high)
 Linear interpolation in a specified range.
 

Public Attributes

uint16_t blackR {}
 Black reference value for red.
 
uint16_t whiteR {}
 White reference value for red.
 
uint16_t blackG {}
 Black reference value for green.
 
uint16_t whiteG {}
 White reference value for green.
 
uint16_t blackB {}
 Black reference value for blue.
 
uint16_t whiteB {}
 White reference value for blue.
 

Detailed Description

Raw value to determine black and white.

Constructor & Destructor Documentation

◆ Calibration()

m5::unit::tcs3472x::Calibration::Calibration ( const uint16_t br,
const uint16_t wr,
const uint16_t bg,
const uint16_t wg,
const uint16_t bb,
const uint16_t wb )
inline
Parameters
brBlack reference value for red
wrWhite reference value for red
bgBlack reference value for green
wgWhite reference value for green
bbBlack reference value for blue
wbWhite reference value for blue