Trait mlx9064x::common::MelexisCamera [−][src]
pub trait MelexisCamera: Sealed {
type PixelRangeIterator: IntoIterator<Item = PixelAddressRange>;
type PixelsInSubpageIterator: IntoIterator<Item = bool>;
const T_A_V_BE: Address;
const T_A_PTAT: Address;
const GAIN: Address;
const V_DD_PIXEL: Address;
const BASIC_TEMPERATURE_RANGE: usize;
const SELF_HEATING: f32;
const HEIGHT: usize;
const WIDTH: usize;
const NUM_PIXELS: usize;
fn pixel_ranges(
subpage: Subpage,
access_pattern: AccessPattern
) -> Self::PixelRangeIterator;
fn pixels_in_subpage(
subpage: Subpage,
access_pattern: AccessPattern
) -> Self::PixelsInSubpageIterator;
fn compensation_pixel(subpage: Subpage) -> Address;
fn resolution_correction(
calibrated_resolution: u8,
current_resolution: u8
) -> f32;
}
Expand description
Define common constants specific to a camera model.
The values from this trait are common between all cameras of a single model, and do not depend on the calibration values from a specific camera.
This is a sealed trait, and can only be implemented by types defined within this crate.
Associated Types
type PixelRangeIterator: IntoIterator<Item = PixelAddressRange>
type PixelsInSubpageIterator: IntoIterator<Item = bool>
Associated Constants
const V_DD_PIXEL: Address
const V_DD_PIXEL: Address
The address for $V_{DD_{pixel}}$.
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.
const SELF_HEATING: f32
const SELF_HEATING: f32
The expected amount of self-heating for this camera.
In normal operation the camera generates some heat. If $T_r$ is not available, it can be calculated by subtracting this value from $T_a$.
const NUM_PIXELS: usize
const NUM_PIXELS: usize
The total number of pixels in the thermal image.
Required methods
fn pixel_ranges(
subpage: Subpage,
access_pattern: AccessPattern
) -> Self::PixelRangeIterator
fn pixel_ranges(
subpage: Subpage,
access_pattern: AccessPattern
) -> Self::PixelRangeIterator
Ranges of memory that should be read to load a subpage’s data from RAM.
Different cameras with different access patterns have different optimal ways of loading data from RAM. In some cases loading by row and then ignoring half the data may be appropriate, in other loading individual pixels may be more efficient.
The returned iterator will yield at most Self::HEIGHT
items.
fn pixels_in_subpage(
subpage: Subpage,
access_pattern: AccessPattern
) -> Self::PixelsInSubpageIterator
fn pixels_in_subpage(
subpage: Subpage,
access_pattern: AccessPattern
) -> Self::PixelsInSubpageIterator
Returns an iterator of booleans for whether or not a pixel should be considered for a subpage.
This is a complement to pixel_ranges
, in that it lets an
implementation load extra memory when it’s more efficient but then ignore the pixels for
later computations.
The iterator should return true when the pixel is part of this subpage, and false when it is not. The ordering is rows, then columns. The iterator must not be infinite; it should only yield as many values as there are pixels.
fn compensation_pixel(subpage: Subpage) -> Address
fn compensation_pixel(subpage: Subpage) -> Address
The address of the compensation pixel for the given subpage.
fn resolution_correction(
calibrated_resolution: u8,
current_resolution: u8
) -> f32
fn resolution_correction(
calibrated_resolution: u8,
current_resolution: u8
) -> f32
Calculate the ADC resolution correction factor