maix.ext_dev.mlx90640
maix.ext_dev.mlx90640 module
You can use
maix.ext_dev.mlx90640
to access this module with MaixPy
This module is generated from MaixPy and MaixCDK
Module
No module
Enum
FPS
MLX90640 FPS
item | describe |
---|---|
values | FPS_1: FPS_2: FPS_4: FPS_8: FPS_16: FPS_32: FPS_64: |
C++ defination code:
enum class FPS : uint8_t { FPS_1 = 0b001, FPS_2 = 0b010, FPS_4 = 0b011, FPS_8 = 0b100, FPS_16 = 0b101, FPS_32 = 0b110, FPS_64 = 0b111, }
Variable
MLX_W
MLX90640 Image Width.
item | description |
---|---|
value | 32 |
readonly | True |
C++ defination code:
constexpr uint32_t MLX_W = 32
MLX_H
MLX90640 Image Height.
item | description |
---|---|
value | 24 |
readonly | True |
C++ defination code:
constexpr uint32_t MLX_H = 24
Function
to_kmatrix
def to_kmatrix(matrix: list[list[float]]) -> list[list[int]]
CMatrix to KMatrix.
item | description |
---|---|
param | matrix: CMatrix type. |
return | KMatrix |
C++ defination code:
KMatrix to_kmatrix(const CMatrix& matrix)
to_cmatrix
def to_cmatrix(matrix: list[list[int]]) -> list[list[float]]
KMatrix to CMatrix
item | description |
---|---|
param | matrix: KMatrix type. |
return | CMatrix |
C++ defination code:
CMatrix to_cmatrix(const KMatrix& matrix)
Class
MLX90640Celsius
MLX90640 (℃)
C++ defination code:
class MLX90640Celsius final
__init__
def __init__(self, i2c_bus_num: int, fps: FPS = ..., cmap: maix.ext_dev.cmap.Cmap = ..., temp_min: float = -1, temp_max: float = -1, emissivity: float = 0.95) -> None
Construct a new MLX90640Celsius object\nThis constructor initializes an MLX90640Celsius object with the specified parameters\nto configure the I2C bus communication, frame rate, color mapping, temperature ranges,\nand emissivity for the MLX90640 thermal camera.
item | description |
---|---|
type | func |
param | i2c_bus_num: The I2C bus number to which the MLX90640 is connected. fps: The preferred frame rate for the MLX90640, default is FPS::FPS_32. cmap: The color mapping to be used for generating the pseudo color image, default is Cmap::WHITE_HOT. temp_min: The minimum reference temperature (in °C) for generating the pseudo color image. Default is -1. temp_max: The maximum reference temperature (in °C) for generating the pseudo color image. Default is -1. If both max and min are equal, it operates in auto mode: the maximum temperature in the frame is taken as the maximum reference temperature, and the minimum temperature in the frame is taken as the minimum reference temperature. emissivity: The emissivity parameter for the MLX90640, default is 0.95. |
static | False |
C++ defination code:
MLX90640Celsius(int i2c_bus_num, ::maix::ext_dev::mlx90640::FPS fps=::maix::ext_dev::mlx90640::FPS::FPS_32, ::maix::ext_dev::cmap::Cmap cmap=::maix::ext_dev::cmap::Cmap::WHITE_HOT, float temp_min=-1, float temp_max=-1, float emissivity=0.95)
matrix
def matrix(self) -> list[list[float]]
Retrieves sensor data and returns a temperature matrix of size MLX_H * MLX_W\nMLX_W: 32\n---------------\n|\nMLX_H |\n: 24 |\nThe matrix structure is represented as list[MLX_H][MLX_W],\nwhere MLX_H is the number of rows (24) and MLX_W is the number of columns (32).
item | description |
---|---|
type | func |
return | CMatrix containing the temperature data, or an empty matrix ([]) if the operation fails. |
static | False |
C++ defination code:
CMatrix matrix()
image
def image(self) -> maix.image.Image
Obtains sensor data and converts it into a pseudo-color image\nThis function retrieves the thermal data from the sensor and processes it\nto generate a pseudo-color representation of the temperature distribution.
item | description |
---|---|
type | func |
return | maix::image::Image* A raw pointer to a maix image object. It is the responsibility of the caller to free this memory in C/C++ to prevent memory leaks. |
static | False |
C++ defination code:
::maix::image::Image* image()
min_temp_point
def min_temp_point(self) -> tuple[int, int, float]
Finds the pixel with the minimum temperature from the most recent reading\nThis function identifies the pixel with the minimum temperature\nfrom the latest data obtained from the sensor.
item | description |
---|---|
type | func |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the pixel with the minimum temperature. If the operation fails, the return values will be x, y < 0. |
static | False |
C++ defination code:
Point min_temp_point()
max_temp_point
def max_temp_point(self) -> tuple[int, int, float]
Finds the pixel with the maximum temperature from the most recent reading\nThis function identifies the pixel with the maximum temperature\nfrom the latest data obtained from the sensor.
item | description |
---|---|
type | func |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the pixel with the maximum temperature. If the operation fails, the return values will be x, y < 0. |
static | False |
C++ defination code:
Point max_temp_point()
center_point
def center_point(self) -> tuple[int, int, float]
Finds the center pixel from the most recent reading\nThis function determines the center pixel of the temperature matrix\nbased on the most recent data obtained from the sensor.
item | description |
---|---|
type | func |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the center pixel in the temperature matrix. If the operation fails, the return values will be x, y < 0. |
static | False |
C++ defination code:
Point center_point()
image_from
def image_from(self, matrix: list[list[float]]) -> maix.image.Image
Converts a given matrix of temperature data into an image\nThis function takes a temperature matrix and generates\na corresponding image representation based on the\nconfigured color map and other parameters.
item | description |
---|---|
type | func |
param | matrix: The temperature matrix to be converted. |
return | maix::image::Image* A pointer to the generated image. It is the responsibility of the caller to free this memory in C/C++ to prevent memory leaks. |
static | False |
C++ defination code:
::maix::image::Image* image_from(const CMatrix& matrix)
max_temp_point_from
def max_temp_point_from(matrix: list[list[float]]) -> tuple[int, int, float]
Finds the pixel with the maximum temperature from the given matrix\nThis static function identifies the pixel with the maximum temperature\nfrom the specified temperature matrix.
item | description |
---|---|
type | func |
param | matrix: The temperature matrix to be analyzed. |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the pixel with the maximum temperature. If the operation fails, the return values will be x, y < 0. |
static | True |
C++ defination code:
static Point max_temp_point_from(const CMatrix& matrix)
min_temp_point_from
def min_temp_point_from(matrix: list[list[float]]) -> tuple[int, int, float]
Finds the pixel with the minimum temperature from the given matrix\nThis static function identifies the pixel with the minimum temperature\nfrom the specified temperature matrix.
item | description |
---|---|
type | func |
param | matrix: The temperature matrix to be analyzed. |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the pixel with the minimum temperature. If the operation fails, the return values will be x, y < 0. |
static | True |
C++ defination code:
static Point min_temp_point_from(const CMatrix& matrix)
center_point_from
def center_point_from(matrix: list[list[float]]) -> tuple[int, int, float]
Finds the center pixel from the given matrix\nThis static function determines the center pixel of the\nspecified temperature matrix based on its dimensions.
item | description |
---|---|
type | func |
param | matrix: The temperature matrix to be analyzed. |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the center pixel in the matrix. If the operation fails, the return values will be x, y < 0. |
static | True |
C++ defination code:
static Point center_point_from(const CMatrix& matrix)
MLX90640Kelvin
MLX90640 (K))
C++ defination code:
class MLX90640Kelvin final
__init__
def __init__(self, i2c_bus_num: int, fps: FPS = ..., cmap: maix.ext_dev.cmap.Cmap = ..., temp_min: float = -1, temp_max: float = -1, emissivity: float = 0.95) -> None
Construct a new MLX90640Kelvin object\nThis constructor initializes an MLX90640Kelvin object with the specified parameters\nto configure the I2C bus communication, frame rate, color mapping, temperature ranges,\nand emissivity for the MLX90640 thermal camera.
item | description |
---|---|
type | func |
param | i2c_bus_num: The I2C bus number to which the MLX90640 is connected. fps: The preferred frame rate for the MLX90640, default is FPS::FPS_32. cmap: The color mapping to be used for generating the pseudo color image, default is Cmap::WHITE_HOT. temp_min: The minimum reference temperature (in K) for generating the pseudo color image. Default is -1. temp_max: The maximum reference temperature (in K) for generating the pseudo color image. Default is -1. If both max and min are equal, it operates in auto mode: the maximum temperature in the frame is taken as the maximum reference temperature, and the minimum temperature in the frame is taken as the minimum reference temperature. emissivity: The emissivity parameter for the MLX90640, default is 0.95. |
static | False |
C++ defination code:
MLX90640Kelvin( int i2c_bus_num, ::maix::ext_dev::mlx90640::FPS fps=::maix::ext_dev::mlx90640::FPS::FPS_32, ::maix::ext_dev::cmap::Cmap cmap=::maix::ext_dev::cmap::Cmap::WHITE_HOT, float temp_min=-1, float temp_max=-1, float emissivity=0.95)
matrix
def matrix(self) -> list[list[int]]
Retrieves sensor data and returns a temperature matrix of size MLX_H * MLX_W\nMLX_W: 32\n---------------\n|\nMLX_H |\n: 24 |\nThe matrix structure is represented as list[MLX_H][MLX_W],\nwhere MLX_H is the number of rows (24) and MLX_W is the number of columns (32).
item | description |
---|---|
type | func |
return | KMatrix containing the temperature data, or an empty matrix ([]) if the operation fails. |
static | False |
C++ defination code:
KMatrix matrix()
image
def image(self) -> maix.image.Image
Obtains sensor data and converts it into a pseudo-color image\nThis function retrieves the thermal data from the sensor and processes it\nto generate a pseudo-color representation of the temperature distribution.
item | description |
---|---|
type | func |
return | maix::image::Image* A raw pointer to a maix image object. It is the responsibility of the caller to free this memory in C/C++ to prevent memory leaks. |
static | False |
C++ defination code:
::maix::image::Image* image()
max_temp_point
def max_temp_point(self) -> tuple[int, int, float]
Finds the pixel with the minimum temperature from the most recent reading\nThis function identifies the pixel with the minimum temperature\nfrom the latest data obtained from the sensor.
item | description |
---|---|
type | func |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the pixel with the minimum temperature. If the operation fails, the return values will be x, y < 0. |
static | False |
C++ defination code:
Point max_temp_point()
min_temp_point
def min_temp_point(self) -> tuple[int, int, float]
Finds the pixel with the maximum temperature from the most recent reading\nThis function identifies the pixel with the maximum temperature\nfrom the latest data obtained from the sensor.
item | description |
---|---|
type | func |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the pixel with the maximum temperature. If the operation fails, the return values will be x, y < 0. |
static | False |
C++ defination code:
Point min_temp_point()
center_point
def center_point(self) -> tuple[int, int, float]
Finds the center pixel from the most recent reading\nThis function determines the center pixel of the temperature matrix\nbased on the most recent data obtained from the sensor.
item | description |
---|---|
type | func |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the center pixel in the temperature matrix. If the operation fails, the return values will be x, y < 0. |
static | False |
C++ defination code:
Point center_point()
image_from
def image_from(self, matrix: list[list[int]]) -> maix.image.Image
Converts a given matrix of temperature data into an image\nThis function takes a temperature matrix and generates\na corresponding image representation based on the\nconfigured color map and other parameters.
item | description |
---|---|
type | func |
param | matrix: The temperature matrix to be converted. |
return | maix::image::Image* A pointer to the generated image. It is the responsibility of the caller to free this memory in C/C++ to prevent memory leaks. |
static | False |
C++ defination code:
::maix::image::Image* image_from(const KMatrix& matrix)
max_temp_point_from
def max_temp_point_from(matrix: list[list[int]]) -> tuple[int, int, float]
Finds the pixel with the maximum temperature from the given matrix\nThis static function identifies the pixel with the maximum temperature\nfrom the specified temperature matrix.
item | description |
---|---|
type | func |
param | matrix: The temperature matrix to be analyzed. |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the pixel with the maximum temperature. If the operation fails, the return values will be x, y < 0. |
static | True |
C++ defination code:
static Point max_temp_point_from(const KMatrix& matrix)
min_temp_point_from
def min_temp_point_from(matrix: list[list[int]]) -> tuple[int, int, float]
Finds the pixel with the minimum temperature from the given matrix\nThis static function identifies the pixel with the minimum temperature\nfrom the specified temperature matrix.
item | description |
---|---|
type | func |
param | matrix: The temperature matrix to be analyzed. |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the pixel with the minimum temperature. If the operation fails, the return values will be x, y < 0. |
static | True |
C++ defination code:
static Point min_temp_point_from(const KMatrix& matrix)
center_point_from
def center_point_from(matrix: list[list[int]]) -> tuple[int, int, float]
Finds the center pixel from the given matrix\nThis static function determines the center pixel of the\nspecified temperature matrix based on its dimensions.
item | description |
---|---|
type | func |
param | matrix: The temperature matrix to be analyzed. |
return | Point A tuple of type <int, int, float>, representing (x, y, temperature) of the center pixel in the matrix. If the operation fails, the return values will be x, y < 0. |
static | True |
C++ defination code:
static Point center_point_from(const KMatrix& matrix)