![]() |
OpenCV 4.13.0
开源计算机视觉库 (Open Source Computer Vision)
|
#include <opencv2/cann.hpp>
类 | |
| 类 | 分配器 |
公开成员函数 | |
| AscendMat (AscendMat::Allocator *allocator_=AscendMat::defaultAllocator()) | |
| 默认构造函数 | |
| AscendMat (const AscendMat &m) | |
| 拷贝构造函数 | |
| AscendMat (InputArray _m, const Rect &roi) | |
| 通过裁剪另一张图像的特定区域来构造 AscendMat | |
| AscendMat (InputArray _m, const Rect &roi, AscendStream &stream) | |
| AscendMat (InputArray arr, AscendStream &stream, AscendMat::Allocator *allocator=AscendMat::defaultAllocator()) | |
| 从主机内存构建 AscendMat(阻塞调用) | |
| AscendMat (int rows, int cols, int type, AscendMat::Allocator *allocator=AscendMat::defaultAllocator()) | |
| 构造指定大小和类型的 AscendMat | |
| AscendMat (int rows, int cols, int type, Scalar &s, AscendMat::Allocator *allocator=AscendMat::defaultAllocator()) | |
| 构造 AscendMat 并用指定值 s 填充 | |
| AscendMat (Size size, int type, AscendMat::Allocator *allocator=AscendMat::defaultAllocator()) | |
| 构造指定大小和类型的 AscendMat | |
| AscendMat (Size size, int type, Scalar &s, AscendMat::Allocator *allocator=AscendMat::defaultAllocator()) | |
| 构造 AscendMat 并用指定值 s 填充 | |
| int | channels () const |
| 返回通道数 | |
| void | convertTo (AscendMat &dst, AscendStream &stream) const |
| 将 AscendMat 转换为另一种数据类型,dst 矩阵将被分配。(非阻塞调用) | |
| void | convertTo (AscendMat &dst, int rtype) const |
| 将 AscendMat 转换为另一种数据类型(阻塞调用) | |
| void | convertTo (AscendMat &dst, int rtype, AscendStream &stream) const |
| 将 AscendMat 转换为另一种数据类型(非阻塞调用) | |
| void | create (int rows, int cols, int type) |
| 分配新的 AscendMat 数据,除非 AscendMat 已经具有指定的大小和类型 | |
| int | depth () const |
| 返回元素类型 | |
| void | download (OutputArray dst) const |
| 将数据从 AscendMat 下载到主机(阻塞调用) | |
| void | download (OutputArray dst, AscendStream &stream) const |
| 将数据从 AscendMat 下载到主机(非阻塞调用) | |
| size_t | elemSize () const |
| 返回以字节为单位的元素大小 | |
| size_t | elemSize1 () const |
| 返回以字节为单位的元素通道大小 | |
| bool | empty () const |
| 如果 AscendMat 数据为 NULL,则返回 true | |
| bool | isContinuous () const |
| AscendMat & | operator= (const AscendMat &m) |
| 赋值操作符 | |
| AscendMat & | setTo (const Scalar &s) |
| 将 AscendMat 的部分元素设置为 s(阻塞调用) | |
| AscendMat & | setTo (const Scalar &s, AscendStream &stream) |
| 将 AscendMat 的部分元素设置为 s(非阻塞调用) | |
| AscendMat & | setTo (float sc) |
| 将 AscendMat 的所有元素设置为 float(阻塞调用) | |
| AscendMat & | setTo (float sc, AscendStream &stream) |
| 将 AscendMat 的所有元素设置为 float(非阻塞调用) | |
| Size | size () const |
| 返回 AscendMat 的大小:width == 列数,height == 行数 | |
| size_t | step1 () const |
| 返回 step/elemSize1() | |
| void | swap (AscendMat &mat) |
| 与其他智能指针交换 | |
| int | type () const |
| 返回元素类型 | |
| void | updateContinuityFlag (更新连续性标志) () |
| 内部使用方法:更新连续性标志 | |
| void | upload (InputArray arr) |
| 将主机内存数据上传到 AscendMat(阻塞调用) | |
| void | upload (InputArray arr, AscendStream &stream) |
| 将主机内存数据上传到 AscendMat(非阻塞调用) | |
静态公开成员函数 | |
| static AscendMat::Allocator * | defaultAllocator () |
| 为 AscendMat 创建默认分配器。此分配器从设备分配指定大小的内存。 | |
| static void | setDefaultAllocator (AscendMat::Allocator *allocator) |
| 设置 AscendMat 的分配器。 | |
公开属性 | |
| 分配器 * | allocator |
| allocator | |
| int | cols (列数) |
| std::shared_ptr< uchar > | data (数据) |
| 指向数据的指针 | |
| const uchar * | dataend (数据结束) |
| uchar * | datastart (数据起始) |
| 在 locateROI 和 adjustROI 中使用的辅助字段 | |
| int | flags (标志) |
| int | rows (行数) |
| 行数和列数 | |
| size_t | step (步长) |
| 连续行之间的距离(以字节为单位);包括任何间隙 | |
|
explicit (显式) |
默认构造函数
| cv::cann::AscendMat::AscendMat | ( | int | rows (行数), |
| int | cols (列数), | ||
| int | type, | ||
| AscendMat::Allocator * | allocator=AscendMat::defaultAllocator() ) |
构造指定大小和类型的 AscendMat
| cv::cann::AscendMat::AscendMat | ( | Size | size (大小), |
| int | type, | ||
| AscendMat::Allocator * | allocator=AscendMat::defaultAllocator() ) |
构造指定大小和类型的 AscendMat
| cv::cann::AscendMat::AscendMat | ( | int | rows (行数), |
| int | cols (列数), | ||
| int | type, | ||
| Scalar & | s, | ||
| AscendMat::Allocator * | allocator=AscendMat::defaultAllocator() ) |
构造 AscendMat 并用指定值 s 填充
| cv::cann::AscendMat::AscendMat | ( | Size | size (大小), |
| int | type, | ||
| Scalar & | s, | ||
| AscendMat::Allocator * | allocator=AscendMat::defaultAllocator() ) |
构造 AscendMat 并用指定值 s 填充
| cv::cann::AscendMat::AscendMat | ( | const AscendMat & | m | ) |
拷贝构造函数
| cv::cann::AscendMat::AscendMat | ( | InputArray | _m, |
| const Rect & | roi (感兴趣区域) ) |
通过裁剪另一张图像的特定区域来构造 AscendMat
| cv::cann::AscendMat::AscendMat | ( | InputArray | _m, |
| const Rect & | roi (感兴趣区域), | ||
| AscendStream & | 流 ) |
|
explicit (显式) |
从主机内存构建 AscendMat(阻塞调用)
| int cv::cann::AscendMat::channels | ( | ) | const |
返回通道数
| void cv::cann::AscendMat::convertTo | ( | AscendMat & | dst, |
| AscendStream & | stream ) const |
将 AscendMat 转换为另一种数据类型,dst 矩阵将被分配。(非阻塞调用)
| void cv::cann::AscendMat::convertTo | ( | AscendMat & | dst, |
| int | rtype ) const |
将 AscendMat 转换为另一种数据类型(阻塞调用)
| void cv::cann::AscendMat::convertTo | ( | AscendMat & | dst, |
| int | rtype, | ||
| AscendStream & | stream ) const |
将 AscendMat 转换为另一种数据类型(非阻塞调用)
| void cv::cann::AscendMat::create | ( | int | rows (行数), |
| int | cols (列数), | ||
| int | type ) |
|
static (静态) |
为 AscendMat 创建默认分配器。此分配器从设备分配指定大小的内存。
| int cv::cann::AscendMat::depth | ( | ) | const |
返回元素类型
| void cv::cann::AscendMat::download | ( | OutputArray | dst | ) | const |
将数据从 AscendMat 下载到主机(阻塞调用)
| void cv::cann::AscendMat::download | ( | OutputArray | dst, |
| AscendStream & | stream ) const |
将数据从 AscendMat 下载到主机(非阻塞调用)
| size_t cv::cann::AscendMat::elemSize | ( | ) | const |
返回以字节为单位的元素大小
| size_t cv::cann::AscendMat::elemSize1 | ( | ) | const |
返回以字节为单位的元素通道大小
| bool cv::cann::AscendMat::empty | ( | ) | const |
如果 AscendMat 数据为 NULL,则返回 true
| bool cv::cann::AscendMat::isContinuous | ( | ) | const |
当 AscendMat 数据连续时(即行之间没有间隙)返回 true。
|
static (静态) |
设置 AscendMat 的分配器。
| allocator |
| AscendMat & cv::cann::AscendMat::setTo | ( | const Scalar & | s, |
| AscendStream & | 流 ) |
将 AscendMat 的部分元素设置为 s(非阻塞调用)
| AscendMat & cv::cann::AscendMat::setTo | ( | float | sc, |
| AscendStream & | 流 ) |
将 AscendMat 的所有元素设置为 float(非阻塞调用)
| size_t cv::cann::AscendMat::step1 | ( | ) | const |
返回 step/elemSize1()
| void cv::cann::AscendMat::swap | ( | AscendMat & | mat | ) |
与其他智能指针交换
| int cv::cann::AscendMat::type | ( | ) | const |
返回元素类型
| void cv::cann::AscendMat::updateContinuityFlag | ( | ) |
内部使用方法:更新连续性标志
| void cv::cann::AscendMat::upload | ( | InputArray | arr (数组) | ) |
将主机内存数据上传到 AscendMat(阻塞调用)
| void cv::cann::AscendMat::upload | ( | InputArray | arr (数组), |
| AscendStream & | 流 ) |
将主机内存数据上传到 AscendMat(非阻塞调用)
| Allocator* cv::cann::AscendMat::allocator |
allocator
| int cv::cann::AscendMat::cols |
| std::shared_ptr<uchar> cv::cann::AscendMat::data |
指向数据的指针
| const uchar* cv::cann::AscendMat::dataend |
| uchar* cv::cann::AscendMat::datastart |
在 locateROI 和 adjustROI 中使用的辅助字段
| int cv::cann::AscendMat::flags |
包含几个位域:
| int cv::cann::AscendMat::rows |
行数和列数
| size_t cv::cann::AscendMat::step |
连续行之间的距离(以字节为单位);包括任何间隙