数据类型
Zivid SDK API 中使用的值类型、容器和实用工具类型。它们是相机、捕获和处理 API 所返回和使用的基本构建模块。
有关每种类型的详尽参考,请参阅 Zivid API 文档。
几何
逐点几何类型:3D 点、2D 点、仅深度点、向量以及图像坐标系中的 2D 边界框。
-
struct PointXYZ
Point with three coordinates as float.
Public Types
-
using ValueType = float
The type of the coordinate values.
Public Functions
-
PointXYZ() = default
Constructor.
-
inline constexpr PointXYZ(float xCoord, float yCoord, float zCoord)
Constructor.
-
inline bool isNaN() const
Check if the point is Not-a-Number (invalid)
A point is defined as NaN if the z-coordinate is NaN
- ZIVID_UTILS_EXPORT std::string toString () const
Get string representation.
- ZIVID_UTILS_EXPORT bool operator== (const PointXYZ &rhs) const
Check for equality.
- ZIVID_UTILS_EXPORT bool operator!= (const PointXYZ &rhs) const
Check for inequality.
-
using ValueType = float
-
struct PointXYZW
Point with four coordinates as float.
Storing the point coordinates in 4D can be useful in some scenarios. For example if the points are to be passed to a different library which expects 4 floats for point coordinates. It is also useful when applying 4x4 transformation matrices.
Public Types
-
using ValueType = float
The type of the coordinate values.
Public Functions
-
PointXYZW() = default
Constructor.
-
inline PointXYZW(float xCoord, float yCoord, float zCoord, float wCoord)
Constructor.
-
inline bool isNaN() const
Check if the point is Not-a-Number (invalid)
A point is defined as NaN if the z-coordinate is NaN
- ZIVID_UTILS_EXPORT std::string toString () const
Get string representation.
- ZIVID_UTILS_EXPORT bool operator== (const PointXYZW &rhs) const
Check for equality.
- ZIVID_UTILS_EXPORT bool operator!= (const PointXYZW &rhs) const
Check for inequality.
-
using ValueType = float
-
struct PointXY
Point with two coordinates as float.
Public Types
-
using ValueType = float
The type of the coordinate values.
Public Functions
-
PointXY() = default
Constructor.
-
inline constexpr PointXY(float xCoord, float yCoord)
Constructor.
-
inline bool isNaN() const
Check if the point is Not-a-Number (invalid)
A point is defined as NaN if the y-coordinate is NaN
- ZIVID_UTILS_EXPORT std::string toString () const
Get string representation.
- ZIVID_UTILS_EXPORT bool operator== (const PointXY &rhs) const
Check for equality.
- ZIVID_UTILS_EXPORT bool operator!= (const PointXY &rhs) const
Check for inequality.
-
using ValueType = float
-
struct PointZ
Point with Z coordinate.
Public Types
-
using ValueType = float
The type of the coordinate values.
Public Functions
-
PointZ() = default
Constructor.
-
inline PointZ(float zCoord)
Constructor.
-
inline bool isNaN() const
Check if the point is Not-a-Number (invalid)
- ZIVID_UTILS_EXPORT std::string toString () const
Get string representation.
- ZIVID_UTILS_EXPORT bool operator== (const PointZ &rhs) const
Check for equality.
- ZIVID_UTILS_EXPORT bool operator!= (const PointZ &rhs) const
Check for inequality.
-
using ValueType = float
-
struct VectorXYZ
Vector with three coordinates as float.
Subclassed by Zivid::NormalXYZ
Public Types
-
using ValueType = float
The type of the coordinate values.
Public Functions
-
VectorXYZ() = default
Constructor.
-
inline VectorXYZ(float xCoord, float yCoord, float zCoord)
Constructor.
-
inline bool isNaN() const
Check if the vector is Not-a-Number (invalid)
A vector is defined as NaN if the z-coordinate is NaN
- ZIVID_UTILS_EXPORT std::string toString () const
Get string representation.
- ZIVID_UTILS_EXPORT bool operator== (const VectorXYZ &rhs) const
Check for equality.
- ZIVID_UTILS_EXPORT bool operator!= (const VectorXYZ &rhs) const
Check for inequality.
-
using ValueType = float
-
struct BoundingBox
Defines a 2D rectangular bounding box in image coordinates.
Public Types
-
using ValueType = int
summary>Constructor
Public Functions
-
inline constexpr BoundingBox(int xCoord, int yCoord, int boxWidth, int boxHeight)
Constructor.
- ZIVID_UTILS_EXPORT std::string toString () const
Get string representation.
- ZIVID_UTILS_EXPORT bool operator== (const BoundingBox &rhs) const
Check for equality.
- ZIVID_UTILS_EXPORT bool operator!= (const BoundingBox &rhs) const
Check for inequality.
-
using ValueType = int
-
struct PointXYZ
Point with three coordinates as float.
-
struct PointXYZW
Point with four coordinates as float (homogeneous coordinates)
-
struct PointXY
Point with two coordinates as float.
-
struct PointZ
Point with only the Z coordinate as float.
颜色
不同通道顺序的逐像素颜色类型,包含或不包含 alpha 通道,具有 8 位和浮点精度,并支持线性和 sRGB 色彩空间。
-
struct ColorRGBA : public Zivid::ColorRGBABase<uint8_t>
Color with 8-bit red, green, blue and alpha channels.
The order of the members is r, g, b, a, and each member is represented as an uint8_t. The members have values from 0 to 255. This type differs from ColorBGRA only in the order of the channels (RGBA vs. BGRA).
This format holds linear color values, which are suitable as input to computer vision algorithms. For showing colors on a display for viewing, consider using the ColorRGBA_SRGB format.
-
struct ColorBGRA : public Zivid::ColorBGRABase<uint8_t>
Color with 8-bit blue, green, red and alpha channels.
The order of the members is b, g, r, a, and each member is represented as an uint8_t. The members have values from 0 to 255. This type differs from ColorRGBA only in the order of the channels (BGRA vs. RGBA).
This format holds linear color values, which are suitable as input to computer vision algorithms. For showing colors on a display for viewing, consider using the ColorRGBA_SRGB format.
-
struct ColorRGB : public Zivid::ColorRGBBase<uint8_t>
Color with 8-bit red, green and blue channels (no alpha)
The order of the members is r, g, b and each member is represented as an uint8_t. The members have values from 0 to 255. This format is identical to ColorRGBA but skips the alpha channel for ~25% bandwidth savings on the device-side path.
This format holds linear color values, which are suitable as input to computer vision algorithms. For showing colors on a display for viewing, consider using the ColorRGB_SRGB format.
-
struct ColorBGR : public Zivid::ColorBGRBase<uint8_t>
Color with 8-bit blue, green and red channels (no alpha)
The order of the members is b, g, r and each member is represented as an uint8_t. The members have values from 0 to 255. This format is identical to ColorBGRA but skips the alpha channel for ~25% bandwidth savings on the device-side path.
This format holds linear color values, which are suitable as input to computer vision algorithms. For showing colors on a display for viewing, consider using the ColorBGR_SRGB format.
-
struct ColorRGBAf : public Zivid::ColorRGBABase<float>
Color with 32-bit red, green, blue and alpha channels.
The order of the members is r, g, b, a, and each member is represented as a 32-bit float. The members have values from 0 to 1.
This format holds linear color values, which are suitable as input to computer vision algorithms. It is the floating-point counterpart of ColorRGBA, covering the same range with 0 to 255 mapped to 0 to 1. It carries more precision than ColorRGBA, which is this value quantized to 8 bits per channel, so
ColorRGBAf * 255and ColorRGBA agree only to within half a quantization step. For showing colors on a display for viewing, consider using the ColorRGBA_SRGB format.
-
struct ColorSRGB : public Zivid::ColorRGBABase<uint8_t>
Color with 8-bit red, green, blue and alpha channels in the sRGB color space.
The order of the members is r, g, b, a and each member is represented as an uint8_t. The members have values from 0 to 255.
The sRGB color space is suitable for showing an image on a display for human viewing. It is easier to see details in darker areas of an image in sRGB than in linear RGB, as more of the dynamic range is dedicated to darker colors. This format is assumed by default by most monitors and should be used when displaying an image.
The name of this type is deprecated as of SDK 2.15. The type will be replaced in the next SDK major version (SDK 3.0). Prefer to use the new type name ColorRGBA_SRGB.
-
typedef ColorSRGB ColorRGBA_SRGB
Color with 8-bit red, green, blue and alpha channels in the sRGB color space.
The order of the members is r, g, b, a and each member is represented as an uint8_t. The members have values from 0 to 255.
The sRGB color space is suitable for showing an image on a display for human viewing. It is easier to see details in darker areas of an image in sRGB than in linear RGB, as more of the dynamic range is dedicated to darker colors. This format is assumed by default by most monitors and should be used when displaying an image.
-
struct ColorBGRA_SRGB : public Zivid::ColorBGRABase<uint8_t>
Color with 8-bit blue, green, red and alpha channels in the sRGB color space.
The order of the members is b, g, r, a and each member is represented as an uint8_t. The members have values from 0 to 255. This type differs from ColorRGBA_SRGB only in the order of the channels (BGRA vs. RGBA).
The sRGB color space is suitable for showing an image on a display for human viewing. It is easier to see details in darker areas of an image in sRGB than in linear RGB, as more of the dynamic range is dedicated to darker colors. This format is assumed by default by most monitors and should be used when displaying an image.
-
struct ColorRGB_SRGB : public Zivid::ColorRGBBase<uint8_t>
Color with 8-bit red, green and blue channels (no alpha) in the sRGB color space.
The order of the members is r, g, b and each member is represented as an uint8_t. The members have values from 0 to 255. This format is identical to ColorRGBA_SRGB but skips the alpha channel for ~25% bandwidth savings on the device-side path.
The sRGB color space is suitable for showing an image on a display for human viewing.
-
struct ColorBGR_SRGB : public Zivid::ColorBGRBase<uint8_t>
Color with 8-bit blue, green and red channels (no alpha) in the sRGB color space.
The order of the members is b, g, r and each member is represented as an uint8_t. The members have values from 0 to 255. This format is identical to ColorBGRA_SRGB but skips the alpha channel for ~25% bandwidth savings on the device-side path.
The sRGB color space is suitable for showing an image on a display for human viewing.
-
struct ColorRGBA
Color with 8-bit red, green, blue and alpha channels.
The order of the members is r, g, b, a, and each member is represented as an uint8_t. The members have values from 0 to 255. This type differs from ColorBGRA only in the order of the channels (RGBA vs. BGRA).
This format holds linear color values, which are suitable as input to computer vision algorithms. For showing colors on a display for viewing, consider using the ColorRGBA_SRGB format.
-
struct ColorBGRA
Color with 8-bit blue, green, red and alpha channels.
The order of the members is b, g, r, a, and each member is represented as an uint8_t. The members have values from 0 to 255. This type differs from ColorRGBA only in the order of the channels (BGRA vs. RGBA).
This format holds linear color values, which are suitable as input to computer vision algorithms. For showing colors on a display for viewing, consider using the ColorRGBA_SRGB format.
-
struct ColorRGBAf
Color with four float channels (red, green, blue, alpha)
Each channel is a 32-bit float in the range [0.0, 1.0]. This format holds linear color values, which are suitable as input to computer vision algorithms and GPU processing.
-
struct ColorSRGB
Color with 8-bit red, green, blue and alpha channels in the sRGB color space.
The sRGB color space is suitable for showing an image on a display for human viewing. It is easier to see details in darker areas of an image in sRGB than in linear RGB, as more of the dynamic range is dedicated to darker colors. This format is assumed by default by most monitors and should be used when displaying an image.
The order of the members is r, g, b, a, and each member is represented as an uint8_t. The members have values from 0 to 255. This type differs from ColorRGBA only in that it is intended to use with color values in the sRGB color space.
This type has been deprecated as of SDK 2.15. The type will be removed in the next SDK major version (SDK 3.0). Prefer to use the new equivalent type ColorRGBA_SRGB.
-
struct ColorRGBA_SRGB
Color with 8-bit red, green, blue and alpha channels in the sRGB color space.
The sRGB color space is suitable for showing an image on a display for human viewing. It is easier to see details in darker areas of an image in sRGB than in linear RGB, as more of the dynamic range is dedicated to darker colors. This format is assumed by default by most monitors and should be used when displaying an image.
The order of the members is r, g, b, a, and each member is represented as an uint8_t. The members have values from 0 to 255. This type differs from ColorRGBA only in that it is intended to use with color values in the sRGB color space.
-
struct ColorBGRA_SRGB
Color with 8-bit blue, green, red and alpha channels in the sRGB color space.
The sRGB color space is suitable for showing an image on a display for human viewing. It is easier to see details in darker areas of an image in sRGB than in linear RGB, as more of the dynamic range is dedicated to darker colors. This format is assumed by default by most monitors and should be used when displaying an image.
The order of the members is b, g, r, a, and each member is represented as an uint8_t. The members have values from 0 to 255. This type differs from ColorRGBA_SRGB only in the order of the channels (BGRA vs. RGBA).
颜色数据以 NumPy 数组形式提供。请参阅 zivid-python。
逐点复合类型
结合了点和颜色的类型,以及逐点法线和信噪比。
-
struct PointXYZColorRGBA
Struct which contains XYZ point and RGBA color packed together.
Contains one PointXYZ (3*4 bytes) and one ColorRGBA (4*1 bytes), making this a 16 byte struct. This type differs from PointXYZColorBGRA only in the order of the color channels (RGBA vs. BGRA).
Public Functions
- ZIVID_UTILS_EXPORT std::string toString () const
Get string representation.
- ZIVID_UTILS_EXPORT bool operator== (const PointXYZColorRGBA &rhs) const
Check for equality.
- ZIVID_UTILS_EXPORT bool operator!= (const PointXYZColorRGBA &rhs) const
Check for inequality.
-
struct PointXYZColorBGRA
Struct which contains XYZ point and BGRA color packed together.
Contains one PointXYZ (3*4 bytes) and one ColorBGRA (4*1 bytes), making this a 16 byte struct. This type differs from PointXYZColorRGBA only in the order of the color channels (BGRA vs. RGBA).
Public Functions
- ZIVID_UTILS_EXPORT std::string toString () const
Get string representation.
- ZIVID_UTILS_EXPORT bool operator== (const PointXYZColorBGRA &rhs) const
Check for equality.
- ZIVID_UTILS_EXPORT bool operator!= (const PointXYZColorBGRA &rhs) const
Check for inequality.
-
struct PointXYZColorRGBA
Struct which contains XYZ point and RGBA color packed together.
Contains one PointXYZ (3*4 bytes) and one ColorRGBA (4*1 bytes), making this a 16 byte struct. This type differs from PointXYZColorBGRA only in the order of the color channels (RGBA vs. BGRA).
-
struct PointXYZColorBGRA
Struct which contains XYZ point and BGRA color packed together.
Contains one PointXYZ (3*4 bytes) and one ColorBGRA (4*1 bytes), making this a 16 byte struct. This type differs from PointXYZColorRGBA only in the order of the color channels (BGRA vs. RGBA).
-
struct NormalXYZ
Normal vector with three coordinates as float.
-
struct SNR
Signal-to-noise ratio value as float.
复合点数据以结构化 NumPy 数组形式提供。请参阅 zivid-python。
容器
点云和图像 API 所使用的通用 1D 和 2D 数组容器。
-
template<typename DataFormat>
class Array1D One-dimensional container of data.
Array1D manages the data using implicit sharing via reference counting. Copy or assignment of an Array1D object is shallow (only a pointer to the data is copied), which makes copy/assignment of Array1D fast. The data stored in the array is deallocated when there are no Array1D instances pointing to it.
The type of the elements stored in the array is given by template parameter DataFormat.
Public Types
-
using ValueType = DataFormat
The type of the elements stored in the Array.
-
using ConstIterator = const DataFormat*
The iterator type for immutable access.
It iterates over individual Array1D elements.
Public Functions
-
inline size_t size() const
Get the number of elements in the array.
-
inline bool isEmpty() const
Check if the array is empty.
-
inline const DataFormat *data() const
Pointer to the first data element of the array.
If the array is empty then this method returns nullptr
-
inline const DataFormat &operator()(size_t idx) const
Constant reference to an element given by an index.
No bounds checking is performed. Calling this operator with an argument that is out of range causes undefined behavior. Calling this operator when the Array1D is empty causes undefined behavior.
- 参数:
idx -- Index (from 0 to size - 1)
-
inline ConstIterator begin() const
Iterator to the beginning of the array.
-
inline ConstIterator end() const
Iterator to the end of the array.
-
inline ConstIterator cbegin() const
Iterator to the beginning of the array.
-
inline ConstIterator cend() const
Iterator to the end of the array.
-
inline std::string toString() const
Get array information as string.
-
using ValueType = DataFormat
-
template<typename DataFormat>
class Array2D Two-dimensional container of data.
Array2D manages the data using implicit sharing via reference counting. Copy or assignment of an Array2D object is shallow (only a pointer to the data is copied), which makes copy/assignment of Array2D fast. The data stored in the array is deallocated when there are no Array2D instances pointing to it.
The type of the elements stored in the array is given by template parameter DataFormat. Elements are stored sequentially in row-major order. Use data to get a pointer to the first element (row 0, column 0).
Public Types
-
using ValueType = DataFormat
The type of the elements stored in the Array2D.
-
using ConstIterator = const DataFormat*
The iterator type for immutable access.
It iterates over individual Array2D elements in row major order.
Public Functions
-
inline size_t width() const
Get the width of the array (number of columns)
-
inline size_t height() const
Get the height of the array (number of rows)
-
inline size_t size() const
Get the number of elements in the array.
-
inline bool isEmpty() const
Check if the array is empty.
-
inline const DataFormat *data() const
Pointer to the first data element of the array.
If the array is empty then this method returns nullptr
-
inline const DataFormat &operator()(size_t idx) const
Constant reference to an element given by a 1D linear index.
Data is stored in row-major order. No bounds checking is performed. Calling this operator with an argument that is out of range causes undefined behavior. Calling this operator when the Array2D is empty causes undefined behavior.
- 参数:
idx -- Index (from 0 to size - 1)
-
inline const DataFormat &operator()(size_t i, size_t j) const
Constant reference to an element given by row and column.
Data is stored in row-major order. No bounds checking is performed. Calling this operator with an argument that is out of range causes undefined behavior. Calling this operator when the Array2D is empty causes undefined behavior.
-
inline ConstIterator begin() const
Iterator to the beginning of the array.
-
inline ConstIterator end() const
Iterator to the end of the array.
-
inline ConstIterator cbegin() const
Iterator to the beginning of the array.
-
inline ConstIterator cend() const
Iterator to the end of the array.
-
inline std::string toString() const
Get array information as string.
-
using ValueType = DataFormat
数组容器通过 C++ 和 Python API 提供。完整参考请参阅 Zivid API 文档。
数组数据以 NumPy 数组形式提供。请参阅 zivid-python。
- class PixelFormat(*values)
Color format of a device array or DeviceArrayView.
The 4-channel formats are 3D (height x width x 4):
RGBA/BGRAare 8-bit,RGBA_SRGB/BGRA_SRGBare 8-bit sRGB-encoded, andRGBAFis float32. The 3-channel formats are 3D (height x width x 3, no alpha):RGB/BGRare 8-bit,RGB_SRGB/BGR_SRGBare 8-bit sRGB-encoded.Not every accessor accepts every format.
create_device_array_viewaccepts all color formats; the Frame2D color accessors (allocate and fill) cover all color formats, while the point-cloud color accessors cover a subset.
掩膜
捕获后应用于点云或帧的二值掩膜,例如用于仅保留某一感兴趣区域。由 PointCloud 和 Frame 上的 mask() / masked() 方法使用。
-
class Mask : public Zivid::Array2D<uint8_t>
A mask for filtering point cloud data.
The Mask class represents a 2D binary mask that can be used to filter point cloud data. Zero values in the mask indicate that the corresponding point should be preserved, while non-zero values indicate that the point should be masked out (set to NaN).
Public Functions
-
ZIVID_UTILS_EXPORT Mask()
Create an empty mask.
-
explicit ZIVID_UTILS_EXPORT Mask(const Resolution &resolution)
Create a nonzero-filled mask with the specified resolution.
- 参数:
resolution -- The resolution (width x height) of the mask
-
ZIVID_UTILS_EXPORT Mask(const Resolution &resolution, const uint8_t *beginIt, const uint8_t *endIt)
Create a mask from third-party mask data (e.g., OpenCV Mat)
The data is copied, so the original data can be safely freed after construction.
- 参数:
resolution -- The resolution (width x height) of the mask
beginIt -- Pointer to the beginning of mask data (uint8_t array)
endIt -- Pointer to the end of mask data (uint8_t array)
-
template<typename Iterator, typename std::enable_if_t<std::is_convertible_v<typename std::iterator_traits<Iterator>::value_type, uint8_t>, std::nullptr_t> = nullptr>
inline Mask(const Resolution &resolution, Iterator beginIt, Iterator endIt) Create a mask from iterator range.
- 参数:
resolution -- The resolution (width x height) of the mask
beginIt -- Iterator to the beginning of mask data
endIt -- Iterator to the end of mask data
- ZIVID_UTILS_EXPORT Resolution resolution () const
Get the resolution of the mask.
- 返回:
Resolution object containing width and height of the mask
- ZIVID_UTILS_EXPORT std::string toString () const
Get string representation of the mask.
- inline ZIVID_UTILS_EXPORT uint8_t * data ()
Mutable pointer to the first data element of the mask.
If the mask is empty then this method returns nullptr
- inline ZIVID_UTILS_EXPORT const uint8_t * data () const
Const pointer to the first data element of the mask.
If the mask is empty then this method returns nullptr
- inline ZIVID_UTILS_EXPORT uint8_t * begin ()
Mutable iterator to the beginning of the mask.
Returns an iterator to the first element of the mask
- inline ZIVID_UTILS_EXPORT uint8_t * end ()
Mutable iterator to the end of the mask.
Returns an iterator to one past the last element of the mask
- inline ZIVID_UTILS_EXPORT uint8_t & operator() (size_t idx)
Mutable reference to an element given by a 1D linear index.
Data is stored in row-major order. No bounds checking is performed. Calling this operator with an argument that is out of range causes undefined behavior. Calling this operator when the mask is empty causes undefined behavior.
- 参数:
idx -- Index (from 0 to size - 1)
- inline ZIVID_UTILS_EXPORT uint8_t & operator() (size_t i, size_t j)
Mutable reference to an element given by row and column.
Data is stored in row-major order. No bounds checking is performed. Calling this operator with an argument that is out of range causes undefined behavior. Calling this operator when the mask is empty causes undefined behavior.
- inline ZIVID_UTILS_EXPORT const uint8_t & operator() (size_t idx) const
Const reference to an element given by a 1D linear index.
Data is stored in row-major order. No bounds checking is performed. Calling this operator with an argument that is out of range causes undefined behavior. Calling this operator when the mask is empty causes undefined behavior.
- 参数:
idx -- Index (from 0 to size - 1)
- inline ZIVID_UTILS_EXPORT const uint8_t & operator() (size_t i, size_t j) const
Const reference to an element given by row and column.
Data is stored in row-major order. No bounds checking is performed. Calling this operator with an argument that is out of range causes undefined behavior. Calling this operator when the mask is empty causes undefined behavior.
-
ZIVID_UTILS_EXPORT Mask()
-
class Mask
Binary mask for filtering point cloud data.
The Mask class represents a 2D binary mask that can be used to filter point cloud data. Zero values in the mask indicate that the corresponding point should be preserved, while non-zero values indicate that the point should be masked out (set to NaN).
Public Functions
- Mask (Resolution ^ resolution)
Create a nonzero-filled mask with specified resolution.
- 参数:
resolution -- The resolution (width and height) of the mask
- Mask (Resolution ^ resolution, cli::array< System::Byte > ^ data)
Create a mask from raw data.
- 参数:
resolution -- The resolution (width and height) of the mask
data -- Raw mask data as byte array
- Resolution ^ GetResolution ()
Get the resolution of the mask.
- System::String ^ ToString () override
Get a string representation of the mask.
- class Mask(mask_data)
Binary mask for filtering point cloud data.
The Mask class represents a 2D binary mask that can be used to filter point cloud data. Non-zero values in the mask indicate that the corresponding point should be masked out (set to NaN), while zero values indicate that the point should be preserved.
- property resolution: Resolution
Get the resolution of the mask.
- 返回:
Resolution object with width and height
数学与实用工具
一种矩阵类型(用于变换)、一个数值范围以及一个 2D 分辨率。
-
template<typename T, size_t rowCount, size_t colCount>
class Matrix A fixed size matrix in row major order.
Public Types
-
using Iterator = typename Storage::iterator
The matrix iterator type for mutable access.
It iterates over individual matrix elements in row major order.
-
using ConstIterator = typename Storage::const_iterator
The matrix iterator type for immutable access.
It iterates over individual matrix elements in row major order.
Public Functions
-
Matrix() = default
Constructor.
-
inline Matrix(const std::string &fileName)
Load the matrix from a file.
-
template<typename U>
inline explicit Matrix(const Matrix<U, rowCount, colCount> &sourceMatrix) Constructor.
-
inline ConstIterator begin() const
Iterator to the beginning of the matrix.
-
inline ConstIterator end() const
Iterator to the end of the matrix.
-
inline ConstIterator cbegin() const
Iterator to the beginning of the matrix.
-
inline ConstIterator cend() const
Iterator to the end of the matrix.
-
inline const T &operator()(size_t row, size_t col) const
Access specified element without bounds checking.
-
void save(const std::string &fileName) const
Save the matrix to the given file.
The matrix is saved in YAML format.
-
void load(const std::string &fileName)
Load the matrix from the given file.
Loads the matrix into the object it was invoked on, does not return a value.
- template<typename Q = T, typename = typename std::enable_if_t<invertSupported, Q>> ZIVID_UTILS_EXPORT Matrix inverse () const
Get the inverse of this matrix.
An exception is thrown if the matrix is not invertible.
- 返回:
A new matrix, holding the inverse
Public Static Functions
-
using Iterator = typename Storage::iterator
-
template<typename T>
class Range Class describing a range of values for a given type
T.The range is inclusive, in other words both the minimum and maximum values are included in the range.
Public Functions
-
constexpr Range() = default
Default constructor.
-
inline constexpr bool isInRange(const T &value) const
Check if the value is in range.
The range is inclusive, in other words both the minimum and maximum values are included in the range.
-
inline std::string toString() const
Get the range as string.
-
constexpr Range() = default
-
class Resolution
Class describing a resolution with a width and a height.
Public Functions
-
ZIVID_UTILS_EXPORT Resolution(size_t width, size_t height)
Construct a Resolution from width and height.
- ZIVID_UTILS_EXPORT size_t width () const
Get the width value of the resolution.
- ZIVID_UTILS_EXPORT size_t height () const
Get the height value of the resolution.
- ZIVID_UTILS_EXPORT size_t size () const
Get the size (area) that is the product of the width and height.
- ZIVID_UTILS_EXPORT bool operator== (const Resolution &other) const
Comparison operator.
- ZIVID_UTILS_EXPORT bool operator!= (const Resolution &other) const
Comparison operator.
- ZIVID_UTILS_EXPORT std::string toString () const
Get a string representation of the resolution.
-
ZIVID_UTILS_EXPORT Resolution(size_t width, size_t height)
-
template<typename T>
struct Range Class describing a range of values for a given type T.
Public Functions
- System::String ^ ToString () override
Get string representation of the object.
-
class Resolution
Class describing a resolution with a width and a height.
Public Functions
-
Resolution(size_t width, size_t height)
Construct a Resolution from width and height.
- System::String ^ ToString () override
Get a string representation of the resolution.
-
Resolution(size_t width, size_t height)
- class Matrix4x4(*args: Any, **kwargs: Any)
Matrix of size 4x4 containing 32-bit floats.
- static identity() Matrix4x4
Return the identity matrix.
- 返回:
A new matrix, holding the identity matrix.
- inverse() Matrix4x4
Return the inverse of this matrix.
An exception is thrown if the matrix is not invertible.
- 返回:
A new matrix, holding the inverse
- class Resolution(width: int, height: int)
Class describing a resolution with a width and a height.
A Resolution represents the dimensions (width x height) of 2D data structures such as images, point clouds, or masks.
捕获输出与缓冲区
相机内参
CameraIntrinsics和Experimental::PixelMapping— 相机矩阵、畸变系数以及传感器到投影仪的像素映射(相机内参)。
标定结果
Calibration::Pose、Calibration::DetectionResult、Calibration::DetectionResultFiducialMarkers、Calibration::MarkerShape和Calibration::MarkerDictionary— 机器人位姿、标定板与标记检测(手眼标定)。Calibration::HandEyeInput、Calibration::HandEyeOutput和Calibration::HandEyeResidual— 手眼标定(手眼标定)。Calibration::MultiCameraOutput和Calibration::MultiCameraResidual— 多相机标定(多相机标定)。
检测结果
信息与维护
CameraInfo、CameraState、CameraHealth、SceneConditions和FrameInfo— 相机元数据、遥测信息、健康状态以及逐帧信息(相机信息与维护)。