Trait mlx9064x::common::CalibrationData [−][src]
pub trait CalibrationData<'a> {
type OffsetReferenceIterator: Iterator<Item = &'a i16>;
type AlphaIterator: Iterator<Item = &'a f32>;
type KvIterator: Iterator<Item = &'a f32>;
type KtaIterator: Iterator<Item = &'a f32>;
Show 24 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 basic_range(&self) -> usize;
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 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
type OffsetReferenceIterator: Iterator<Item = &'a i16>
type AlphaIterator: Iterator<Item = &'a f32>
type KvIterator: Iterator<Item = &'a f32>
type KtaIterator: Iterator<Item = &'a f32>
Required methods
fn resolution(&self) -> u8
fn resolution(&self) -> u8
ADC resolution this camera was calibrated at.
fn alpha_ptat(&self) -> f32
fn alpha_ptat(&self) -> f32
Sensitivity proportional to ambient temperature (αPTAT).
fn corner_temperatures(&self) -> &[i16]
fn corner_temperatures(&self) -> &[i16]
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 (KsTo(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: KSTo1 through how every many temperature ranges the camera has).
This method returns a slice of values equal in length to
corner_temperatures
.
fn alpha_correction(&self) -> &[f32]
fn alpha_correction(&self) -> &[f32]
Temperature range sensitivity correction (α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
,
fn basic_range(&self) -> usize
fn basic_range(&self) -> usize
The index of the basic temperature range.
Temperature ranges (delimited by the control temperatures) outside of the basic range are “extended temperature ranges” and require extra processing for accuracy. The datasheets don’t give a generic definition of the basic range, but for this library it is defined as the temperature range with αcorrection(r) = 1. Also note that this library uses 0-indexing as opposed to the datasheets that use 1-indexing.
fn offset_reference_pixels(
&'a self,
subpage: Subpage
) -> Self::OffsetReferenceIterator
fn offset_reference_pixels(
&'a self,
subpage: Subpage
) -> Self::OffsetReferenceIterator
An iterator over the per-pixel offset reference values for the given subpage (Offsetreference(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.
fn offset_reference_cp(&self, subpage: Subpage) -> i16
fn offset_reference_cp(&self, subpage: Subpage) -> i16
The offset reference value for the compensation pixel corresponding to the given subpage (OffsetreferenceCP).
fn alpha_pixels(&'a self, subpage: Subpage) -> Self::AlphaIterator
fn alpha_pixels(&'a self, subpage: Subpage) -> Self::AlphaIterator
An iterator over the per-pixel sensitivity calibration values (α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 (αCP).
fn k_v_pixels(&'a self, subpage: Subpage) -> Self::KvIterator
fn k_v_pixels(&'a self, subpage: Subpage) -> Self::KvIterator
An iterator over the per-pixel voltage calibration constants (KVpixel).
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 (KVCP).
fn k_ta_pixels(&'a self, subpage: Subpage) -> Self::KtaIterator
fn k_ta_pixels(&'a self, subpage: Subpage) -> Self::KtaIterator
The per pixel ambient temperature calibration constants (KTapixel).
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 (KTaCP).
fn temperature_gradient_coefficient(&self) -> Option<f32>
fn temperature_gradient_coefficient(&self) -> Option<f32>
Temperature gradient coefficient (TGC).
Some devices do not support a TGC (it can also be disabled manually on other devices).
Provided methods
Pixel supply voltage (VDD0).
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.
fn emissivity(&self) -> Option<f32>
fn emissivity(&self) -> Option<f32>
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).