Function mlx9064x::calculations::per_pixel_v_ir[][src]

pub fn per_pixel_v_ir(
    pixel_data: i16,
    common: &CommonIrData,
    reference_offset: i16,
    k_v: f32,
    k_ta: f32,
    access_mode_compensation: Option<f32>
) -> f32
Expand description

Calculate a measurement of raw IR captured by a single pixel

This function combines all per-pixel calculations related to the raw IR data as described by section 11.2.2.5 in both datasheets. If just an “image” is required but not the actual temperature, the datasheets recommend stopping at this step instead of continuing on with the calculations performed by per_pixel_temperature.

\begin{align*} \text{pix}_{gain(i, j)} &= \text{[Pixel value from RAM]} * K_{gain} \newline \text{pix}_{OS(i, j)} &= pix_{gain(i, j)} \newline &\hspace{4em}- \textit{offset}_{(i, j)} \newline &\hspace{4em}* (1 + K_{T_{a}(i, j)} * (T_a - T_{a_0})) \newline &\hspace{4em}* (1 + K_{V(i, j)} * (V_{DD} - V_{DD_0})) \newline V_{IR(i, j)} &= \frac{pix_{OS(i, j)}}{\varepsilon} \end{align*}

CalibrationData provides the per-pixel offset, $K_{V}$ (k_v_pixels), and $K_{T_{a}}$ (k_ta_pixels) values, while $K_{gain}$, $V_{DD}$, $T_{a}$, and emissivity ($\varepsilon$) are provided by CommonIrData. $V_{DD_0}$ and $T_{a_0}$ are defined as 3.3 and 25 respectively.

This function is also used for calculating the compensation pixel values when using thermal gradient compensation.