maix::ext_dev::opns303x
maix.ext_dev.opns303x module
This is
maix::ext_dev::opns303x
module of MaixCDK.
All of these elements are in namespacemaix::ext_dev::opns303x
.For MaixCDK developer: DO NOT edit this doc file manually, this doc is auto generated!
Module
No module
Enum
Resolution
Opns303x Resolution
item | describe |
---|---|
values | RES_100x100: RES_50x50: RES_25x25: |
C++ defination code:
enum class Resolution : uint32_t { RES_100x100 = 100, RES_50x50 = 50, RES_25x25 = 25, }
Variable
Function
Class
Opns303x
Opns303x TOF
C++ defination code:
class Opns303x final
__init__
Construct a new Opns303x object
item | description |
---|---|
type | func |
param | spi_bus_num: SPI bus number. resolution: @see Resolution cmap: The color mapping to be used for generating the pseudo color image dis_min: The minimum reference distance (in mm) for generating the pseudo color image. Default is -1. dis_max: The maximum reference distance (in mm) for generating the pseudo color image. Default is -1. If both max and min are equal, it operates in auto mode: the maximum distance in the frame is taken as the maximum reference distance, and the minimum distance in the frame is taken as the minimum reference distance. |
static | False |
C++ defination code:
Opns303x(int spi_bus_num, ::maix::ext_dev::opns303x::Resolution resolution=::maix::ext_dev::opns303x::Resolution::RES_50x50, ::maix::ext_dev::cmap::Cmap cmap=::maix::ext_dev::cmap::Cmap::JET, int dis_min=-1, int dis_max=-1)
matrix
Retrieves sensor data and returns a distance matrix.
item | description |
---|---|
type | func |
return | Matrix containing the distance data, or an empty matrix ([]) if the operation fails. |
static | False |
C++ defination code:
TOFMatrix matrix()
image
Obtains sensor data and converts it into a pseudo-color image
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_dis_point
Finds the pixel with the maximum distance from the most recent reading
item | description |
---|---|
type | func |
return | Point A tuple of type <int, int, float>, representing (x, y, distance) of the pixel with the maximum distance. If the operation fails, the return values will be x, y < 0. |
static | False |
C++ defination code:
TOFPoint max_dis_point()
min_dis_point
Finds the pixel with the minimum distance from the most recent reading
item | description |
---|---|
type | func |
return | Point A tuple of type <int, int, float>, representing (x, y, distance) of the pixel with the minimum distance. If the operation fails, the return values will be x, y < 0. |
static | False |
C++ defination code:
TOFPoint min_dis_point()
center_point
Finds the center pixel from the most recent reading
item | description |
---|---|
type | func |
return | Point A tuple of type <int, int, float>, representing (x, y, distance) of the center pixel in the distance matrix. If the operation fails, the return values will be x, y < 0. |
static | False |
C++ defination code:
TOFPoint center_point()
image_from
Converts a given matrix of distance data into an image
item | description |
---|---|
type | func |
param | matrix: The distance 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 TOFMatrix& matrix)
max_dis_point_from
Finds the pixel with the maximum distance from the given matrix
item | description |
---|---|
type | func |
param | matrix: The distance matrix to be analyzed. |
return | Point A tuple of type <int, int, float>, representing (x, y, distance) of the pixel with the maximum distance. If the operation fails, the return values will be x, y < 0. |
static | True |
C++ defination code:
static TOFPoint max_dis_point_from(const TOFMatrix& matrix)
min_dis_point_from
Finds the pixel with the minimum distance from the given matrix
item | description |
---|---|
type | func |
param | matrix: The distance matrix to be analyzed. |
return | Point A tuple of type <int, int, float>, representing (x, y, distance) of the pixel with the minimum distance. If the operation fails, the return values will be x, y < 0. |
static | True |
C++ defination code:
static TOFPoint min_dis_point_from(const TOFMatrix& matrix)
center_point_from
Finds the center pixel from the given matrix
item | description |
---|---|
type | func |
param | matrix: The distance matrix to be analyzed. |
return | Point A tuple of type <int, int, float>, representing (x, y, distance) 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 TOFPoint center_point_from(const TOFMatrix& matrix)