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