Trait mlx9064x::common::CalibrationData[][src]

pub trait CalibrationData<'a> {
    type Camera: MelexisCamera;
    type OffsetReferenceIterator: Iterator<Item = &'a i16>;
    type AlphaIterator: Iterator<Item = &'a f32>;
    type KvIterator: Iterator<Item = &'a f32>;
    type KtaIterator: Iterator<Item = &'a f32>;
    type AccessPatternCompensation: Iterator<Item = Option<&'a f32>>;
Show 25 methods fn k_v_dd(&self) -> i16;
fn v_dd_25(&self) -> i16;
fn resolution(&self) -> u8;
fn k_v_ptat(&self) -> f32;
fn k_t_ptat(&self) -> f32;
fn v_ptat_25(&self) -> f32;
fn alpha_ptat(&self) -> f32;
fn gain(&self) -> f32;
fn k_s_ta(&self) -> f32;
fn corner_temperatures(&self) -> &[i16];
fn k_s_to(&self) -> &[f32];
fn alpha_correction(&self) -> &[f32];
fn offset_reference_pixels(
        &'a self,
        subpage: Subpage
    ) -> Self::OffsetReferenceIterator;
fn offset_reference_cp(&self, subpage: Subpage) -> i16;
fn alpha_pixels(&'a self, subpage: Subpage) -> Self::AlphaIterator;
fn alpha_cp(&self, subpage: Subpage) -> f32;
fn k_v_pixels(&'a self, subpage: Subpage) -> Self::KvIterator;
fn k_v_cp(&self, subpage: Subpage) -> f32;
fn k_ta_pixels(&'a self, subpage: Subpage) -> Self::KtaIterator;
fn k_ta_cp(&self, subpage: Subpage) -> f32;
fn temperature_gradient_coefficient(&self) -> Option<f32>;
fn access_pattern_compensation_pixels(
        &'a self,
        access_pattern: AccessPattern
    ) -> Self::AccessPatternCompensation;
fn access_pattern_compensation_cp(
        &self,
        subpage: Subpage,
        access_pattern: AccessPattern
    ) -> Option<f32>; fn v_dd_0(&self) -> f32 { ... }
fn emissivity(&self) -> Option<f32> { ... }
}
Expand description

This trait provides access to the module-specific calibration data.

Each MLX9064* camera has calibration data from the factory stored on its EEPROM. The factory-provided data is then used as the input to generate the constants needed to convert the raw output of the camera into concrete temperatures (or even just raw infrared radition measurements). The naming scheme for the methods in this trait is taken from the names of the variables used in the formulas in the datasheet. Most users of this library can make use fo the provided implementations, but if you’re trying to minimize memory usage or tweak performance for a specific use case, this might be a way to do it.

Associated Types

The camera model this caliberation data is for.

Required methods

Pixel supply voltage constant ($K_{V_{DD}}$).

Constant for pixel supply voltage at 25℃ ($K_{V_{DD_{25}}}$).

ADC resolution this camera was calibrated at.

Voltage proportional to ambient temperature constant ($K_{V_{PTAT}}$).

Temperature proportional to ambient temperature constant ($K_{T_{PTAT}}$).

Voltage proportional to ambient temperature at 25℃ ($V_{PTAT_{25}}$).

Sensitivity proportional to ambient temperature ($\alpha_{PTAT}$).

The gain constant. Usually written as GAIN in the datasheets.

Sensitivity constant for ambient temperature ($K_{S_{T_{a}}}$).

A slice of the “corner temperatures”.

These define temperature ranges with different sensitivity characteristics. They are indexed in the datasheet starting from 1 but everything in this library is 0-indexed, so be aware of the difference.

Constant for the object temperature sensitivity ($K_{s_{T_{o}N}}$) depending on the temperature range.

This is a slight variance from the datasheet’s nomenclature. In the symbol above, N is the index of the temperature range, which the datasheet normally just writes out (ex: $K_{S_{T_{o}1}}$ through how every many temperature ranges the camera has).

This method returns a slice of values equal in length to corner_temperatures.

Temperature range sensitivity correction ($\alpha_{\text{correction}_{N}}$)

Like k_s_to, the name of this method is slightly different that the naming in the datasheet. Also like k_s_to, this method returns a slice of values with a length equal to the length of the slice returned by corner_temperatures,

An iterator over the per-pixel offset reference values for the given subpage ($\text{Offset}_\text{reference}(i, j)$).

The iterator must yield pixels by row, then by columns, with the rows increasing from left to right and the columns increasing from top to bottom. The iterator must yield all pixels, even if they would not normally be present in the given subpage.

The offset reference value for the compensation pixel corresponding to the given subpage ($\text{Offset}_{\text{reference}_{CP}}$).

An iterator over the per-pixel sensitivity calibration values ($\alpha_{pixel}(i, j)$).

The iterator must yield pixels by row, then by columns, with the rows increasing from left to right and the columns increasing from top to bottom. The iterator must yield all pixels, even if they would not normally be present in the given subpage.

The sensitivity calibration value for the compensation pixel for the given subpage ($\alpha_{CP}$).

An iterator over the per-pixel voltage calibration constants ($K_{V_{pixel}}$).

The iterator must yield pixels by row, then by columns, with the rows increasing from left to right and the columns increasing from top to bottom. The iterator must yield all pixels, even if they would not normally be present in the given subpage.

The voltage calibration constant for the compensation pixel for the given subpage ($K_{V_{CP}}$).

The per pixel ambient temperature calibration constants ($K_{T_{a}pixel}$).

The iterator must yield pixels by row, then by columns, with the rows increasing from left to right and the columns increasing from top to bottom. The iterator must yield all pixels, even if they would not normally be present in the given subpage.

The ambient temperature calibration constant for the compensation pixel for the given subpage ($K_{T_{a}CP}$).

Temperature gradient coefficient (TGC).

Some devices do not support a TGC (it can also be disabled manually on other devices).

A sequence of per-pixel correction values that are added to the pixel gain value.

The MLX90640 can be used in interleaved mode, but for optimal performance a correction needs to be applied. This value is summed with the pixel gain value and reference offset (the reference offset being scaled relative to the temperature difference).

Equivalent to Self::access_pattern_compensation_pixels for compensation pixels.

Provided methods

Pixel supply voltage ($K_{DD_0}$).

This is the voltage supplied to the device, and should be 3.3V for the MLX90640 and MLX90641. The default implementation is hardcoded to return 3.3f32, but if there’s a reason it needs to be overridden, it’s possible.

The emissivity stored on the device.

Not all devices support storing the emissivity, in which case they should return None (which is what the provided implementation does).

Implementors