OpenCV
5.0.0-pre
Open Source Computer Vision
|
#include <opencv2/cann.hpp>
Classes | |
class | Allocator |
Public Member Functions | |
AscendMat (AscendMat::Allocator *allocator_=AscendMat::defaultAllocator()) | |
default constructor | |
AscendMat (const AscendMat &m) | |
copy constructor | |
AscendMat (InputArray _m, const Rect &roi) | |
constructs AscendMat by crop a certain area from another | |
AscendMat (InputArray _m, const Rect &roi, AscendStream &stream) | |
AscendMat (InputArray arr, AscendStream &stream, AscendMat::Allocator *allocator=AscendMat::defaultAllocator()) | |
builds AscendMat from host memory (Blocking call) | |
AscendMat (int rows, int cols, int type, AscendMat::Allocator *allocator=AscendMat::defaultAllocator()) | |
constructs AscendMat of the specified size and type | |
AscendMat (int rows, int cols, int type, Scalar &s, AscendMat::Allocator *allocator=AscendMat::defaultAllocator()) | |
constructs AscendMat and fills it with the specified value s | |
AscendMat (Size size, int type, AscendMat::Allocator *allocator=AscendMat::defaultAllocator()) | |
constructs AscendMat of the specified size and type | |
AscendMat (Size size, int type, Scalar &s, AscendMat::Allocator *allocator=AscendMat::defaultAllocator()) | |
constructs AscendMat and fills it with the specified value s | |
int | channels () const |
returns number of channels | |
void | convertTo (AscendMat &dst, AscendStream &stream) const |
converts AscendMat to another datatype, dst mat is allocated. (Non-Blocking call) | |
void | convertTo (AscendMat &dst, int rtype) const |
converts AscendMat to another datatype (Blocking call) | |
void | convertTo (AscendMat &dst, int rtype, AscendStream &stream) const |
converts AscendMat to another datatype (Non-Blocking call) | |
void | create (int rows, int cols, int type) |
allocates new AscendMat data unless the AscendMat already has specified size and type | |
int | depth () const |
returns element type | |
void | download (OutputArray dst) const |
download data from AscendMat to host (Blocking call) | |
void | download (OutputArray dst, AscendStream &stream) const |
download data from AscendMat to host (Non-Blocking call) | |
size_t | elemSize () const |
returns element size in bytes | |
size_t | elemSize1 () const |
returns the size of element channel in bytes | |
bool | empty () const |
returns true if AscendMat data is NULL | |
bool | isContinuous () const |
AscendMat & | operator= (const AscendMat &m) |
assignment operators | |
AscendMat & | setTo (const Scalar &s) |
sets some of the AscendMat elements to s (Blocking call) | |
AscendMat & | setTo (const Scalar &s, AscendStream &stream) |
sets some of the AscendMat elements to s (Non-Blocking call) | |
AscendMat & | setTo (float sc) |
sets all of the AscendMat elements to float (Blocking call) | |
AscendMat & | setTo (float sc, AscendStream &stream) |
sets all of the AscendMat elements to float (Non-Blocking call) | |
Size | size () const |
returns AscendMat size : width == number of columns, height == number of rows | |
size_t | step1 () const |
returns step/elemSize1() | |
void | swap (AscendMat &mat) |
swaps with other smart pointer | |
int | type () const |
returns element type | |
void | updateContinuityFlag () |
internal use method: updates the continuity flag | |
void | upload (InputArray arr) |
upload host memory data to AscendMat (Blocking call) | |
void | upload (InputArray arr, AscendStream &stream) |
upload host memory data to AscendMat (Non-Blocking call) | |
Static Public Member Functions | |
static AscendMat::Allocator * | defaultAllocator () |
Create default allocator for AscendMat. This allocator alloc memory from device for specific size. | |
static void | setDefaultAllocator (AscendMat::Allocator *allocator) |
Set allocator for AscendMat. | |
Public Attributes | |
Allocator * | allocator |
allocator | |
int | cols |
std::shared_ptr< uchar > | data |
pointer to the data | |
const uchar * | dataend |
uchar * | datastart |
helper fields used in locateROI and adjustROI | |
int | flags |
int | rows |
the number of rows and columns | |
size_t | step |
a distance between successive rows in bytes; includes the gap if any | |
|
explicit |
default constructor
cv::cann::AscendMat::AscendMat | ( | int | rows, |
int | cols, | ||
int | type, | ||
AscendMat::Allocator * | allocator = AscendMat::defaultAllocator() |
||
) |
constructs AscendMat of the specified size and type
cv::cann::AscendMat::AscendMat | ( | Size | size, |
int | type, | ||
AscendMat::Allocator * | allocator = AscendMat::defaultAllocator() |
||
) |
constructs AscendMat of the specified size and type
cv::cann::AscendMat::AscendMat | ( | int | rows, |
int | cols, | ||
int | type, | ||
Scalar & | s, | ||
AscendMat::Allocator * | allocator = AscendMat::defaultAllocator() |
||
) |
constructs AscendMat and fills it with the specified value s
cv::cann::AscendMat::AscendMat | ( | Size | size, |
int | type, | ||
Scalar & | s, | ||
AscendMat::Allocator * | allocator = AscendMat::defaultAllocator() |
||
) |
constructs AscendMat and fills it with the specified value s
cv::cann::AscendMat::AscendMat | ( | const AscendMat & | m | ) |
copy constructor
cv::cann::AscendMat::AscendMat | ( | InputArray | _m, |
const Rect & | roi | ||
) |
constructs AscendMat by crop a certain area from another
cv::cann::AscendMat::AscendMat | ( | InputArray | _m, |
const Rect & | roi, | ||
AscendStream & | stream | ||
) |
|
explicit |
builds AscendMat from host memory (Blocking call)
int cv::cann::AscendMat::channels | ( | ) | const |
returns number of channels
void cv::cann::AscendMat::convertTo | ( | AscendMat & | dst, |
AscendStream & | stream | ||
) | const |
converts AscendMat to another datatype, dst mat is allocated. (Non-Blocking call)
void cv::cann::AscendMat::convertTo | ( | AscendMat & | dst, |
int | rtype | ||
) | const |
converts AscendMat to another datatype (Blocking call)
void cv::cann::AscendMat::convertTo | ( | AscendMat & | dst, |
int | rtype, | ||
AscendStream & | stream | ||
) | const |
converts AscendMat to another datatype (Non-Blocking call)
void cv::cann::AscendMat::create | ( | int | rows, |
int | cols, | ||
int | type | ||
) |
|
static |
Create default allocator for AscendMat. This allocator alloc memory from device for specific size.
int cv::cann::AscendMat::depth | ( | ) | const |
returns element type
void cv::cann::AscendMat::download | ( | OutputArray | dst | ) | const |
download data from AscendMat to host (Blocking call)
void cv::cann::AscendMat::download | ( | OutputArray | dst, |
AscendStream & | stream | ||
) | const |
download data from AscendMat to host (Non-Blocking call)
size_t cv::cann::AscendMat::elemSize | ( | ) | const |
returns element size in bytes
size_t cv::cann::AscendMat::elemSize1 | ( | ) | const |
returns the size of element channel in bytes
bool cv::cann::AscendMat::empty | ( | ) | const |
returns true if AscendMat data is NULL
bool cv::cann::AscendMat::isContinuous | ( | ) | const |
returns true iff the AscendMat data is continuous (i.e. when there are no gaps between successive rows)
|
static |
Set allocator for AscendMat.
allocator |
sets some of the AscendMat elements to s (Blocking call)
AscendMat & cv::cann::AscendMat::setTo | ( | const Scalar & | s, |
AscendStream & | stream | ||
) |
sets some of the AscendMat elements to s (Non-Blocking call)
AscendMat & cv::cann::AscendMat::setTo | ( | float | sc | ) |
sets all of the AscendMat elements to float (Blocking call)
AscendMat & cv::cann::AscendMat::setTo | ( | float | sc, |
AscendStream & | stream | ||
) |
sets all of the AscendMat elements to float (Non-Blocking call)
Size cv::cann::AscendMat::size | ( | ) | const |
returns AscendMat size : width == number of columns, height == number of rows
size_t cv::cann::AscendMat::step1 | ( | ) | const |
returns step/elemSize1()
void cv::cann::AscendMat::swap | ( | AscendMat & | mat | ) |
swaps with other smart pointer
int cv::cann::AscendMat::type | ( | ) | const |
returns element type
void cv::cann::AscendMat::updateContinuityFlag | ( | ) |
internal use method: updates the continuity flag
void cv::cann::AscendMat::upload | ( | InputArray | arr | ) |
upload host memory data to AscendMat (Blocking call)
void cv::cann::AscendMat::upload | ( | InputArray | arr, |
AscendStream & | stream | ||
) |
upload host memory data to AscendMat (Non-Blocking call)
Allocator* cv::cann::AscendMat::allocator |
allocator
int cv::cann::AscendMat::cols |
std::shared_ptr<uchar> cv::cann::AscendMat::data |
pointer to the data
const uchar* cv::cann::AscendMat::dataend |
uchar* cv::cann::AscendMat::datastart |
helper fields used in locateROI and adjustROI
int cv::cann::AscendMat::flags |
includes several bit-fields:
int cv::cann::AscendMat::rows |
the number of rows and columns
size_t cv::cann::AscendMat::step |
a distance between successive rows in bytes; includes the gap if any