OpenCV  5.0.0-pre
Open Source Computer Vision
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cv::cann::AscendMat Class Reference

#include <opencv2/cann.hpp>

Collaboration diagram for cv::cann::AscendMat:

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
 
AscendMatoperator= (const AscendMat &m)
 assignment operators
 
AscendMatsetTo (const Scalar &s)
 sets some of the AscendMat elements to s (Blocking call)
 
AscendMatsetTo (const Scalar &s, AscendStream &stream)
 sets some of the AscendMat elements to s (Non-Blocking call)
 
AscendMatsetTo (float sc)
 sets all of the AscendMat elements to float (Blocking call)
 
AscendMatsetTo (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::AllocatordefaultAllocator ()
 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

Allocatorallocator
 allocator
 
int cols
 
std::shared_ptr< uchardata
 pointer to the data
 
const uchardataend
 
uchardatastart
 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
 

Constructor & Destructor Documentation

◆ AscendMat() [1/9]

cv::cann::AscendMat::AscendMat ( AscendMat::Allocator allocator_ = AscendMat::defaultAllocator())
explicit

default constructor

◆ AscendMat() [2/9]

cv::cann::AscendMat::AscendMat ( int  rows,
int  cols,
int  type,
AscendMat::Allocator allocator = AscendMat::defaultAllocator() 
)

constructs AscendMat of the specified size and type

◆ AscendMat() [3/9]

cv::cann::AscendMat::AscendMat ( Size  size,
int  type,
AscendMat::Allocator allocator = AscendMat::defaultAllocator() 
)

constructs AscendMat of the specified size and type

◆ AscendMat() [4/9]

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

◆ AscendMat() [5/9]

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

◆ AscendMat() [6/9]

cv::cann::AscendMat::AscendMat ( const AscendMat m)

copy constructor

◆ AscendMat() [7/9]

cv::cann::AscendMat::AscendMat ( InputArray  _m,
const Rect roi 
)

constructs AscendMat by crop a certain area from another

◆ AscendMat() [8/9]

cv::cann::AscendMat::AscendMat ( InputArray  _m,
const Rect roi,
AscendStream stream 
)

◆ AscendMat() [9/9]

cv::cann::AscendMat::AscendMat ( InputArray  arr,
AscendStream stream,
AscendMat::Allocator allocator = AscendMat::defaultAllocator() 
)
explicit

builds AscendMat from host memory (Blocking call)

Member Function Documentation

◆ channels()

int cv::cann::AscendMat::channels ( ) const

returns number of channels

◆ convertTo() [1/3]

void cv::cann::AscendMat::convertTo ( AscendMat dst,
AscendStream stream 
) const

converts AscendMat to another datatype, dst mat is allocated. (Non-Blocking call)

◆ convertTo() [2/3]

void cv::cann::AscendMat::convertTo ( AscendMat dst,
int  rtype 
) const

converts AscendMat to another datatype (Blocking call)

◆ convertTo() [3/3]

void cv::cann::AscendMat::convertTo ( AscendMat dst,
int  rtype,
AscendStream stream 
) const

converts AscendMat to another datatype (Non-Blocking call)

◆ create()

void cv::cann::AscendMat::create ( int  rows,
int  cols,
int  type 
)

allocates new AscendMat data unless the AscendMat already has specified size and type

◆ defaultAllocator()

static AscendMat::Allocator * cv::cann::AscendMat::defaultAllocator ( )
static

Create default allocator for AscendMat. This allocator alloc memory from device for specific size.

◆ depth()

int cv::cann::AscendMat::depth ( ) const

returns element type

◆ download() [1/2]

void cv::cann::AscendMat::download ( OutputArray  dst) const

download data from AscendMat to host (Blocking call)

◆ download() [2/2]

void cv::cann::AscendMat::download ( OutputArray  dst,
AscendStream stream 
) const

download data from AscendMat to host (Non-Blocking call)

◆ elemSize()

size_t cv::cann::AscendMat::elemSize ( ) const

returns element size in bytes

◆ elemSize1()

size_t cv::cann::AscendMat::elemSize1 ( ) const

returns the size of element channel in bytes

◆ empty()

bool cv::cann::AscendMat::empty ( ) const

returns true if AscendMat data is NULL

◆ isContinuous()

bool cv::cann::AscendMat::isContinuous ( ) const

returns true iff the AscendMat data is continuous (i.e. when there are no gaps between successive rows)

◆ operator=()

AscendMat & cv::cann::AscendMat::operator= ( const AscendMat m)

assignment operators

◆ setDefaultAllocator()

static void cv::cann::AscendMat::setDefaultAllocator ( AscendMat::Allocator allocator)
static

Set allocator for AscendMat.

Parameters
allocator

◆ setTo() [1/4]

AscendMat & cv::cann::AscendMat::setTo ( const Scalar s)

sets some of the AscendMat elements to s (Blocking call)

◆ setTo() [2/4]

AscendMat & cv::cann::AscendMat::setTo ( const Scalar s,
AscendStream stream 
)

sets some of the AscendMat elements to s (Non-Blocking call)

◆ setTo() [3/4]

AscendMat & cv::cann::AscendMat::setTo ( float  sc)

sets all of the AscendMat elements to float (Blocking call)

◆ setTo() [4/4]

AscendMat & cv::cann::AscendMat::setTo ( float  sc,
AscendStream stream 
)

sets all of the AscendMat elements to float (Non-Blocking call)

◆ size()

Size cv::cann::AscendMat::size ( ) const

returns AscendMat size : width == number of columns, height == number of rows

◆ step1()

size_t cv::cann::AscendMat::step1 ( ) const

returns step/elemSize1()

◆ swap()

void cv::cann::AscendMat::swap ( AscendMat mat)

swaps with other smart pointer

◆ type()

int cv::cann::AscendMat::type ( ) const

returns element type

◆ updateContinuityFlag()

void cv::cann::AscendMat::updateContinuityFlag ( )

internal use method: updates the continuity flag

◆ upload() [1/2]

void cv::cann::AscendMat::upload ( InputArray  arr)

upload host memory data to AscendMat (Blocking call)

◆ upload() [2/2]

void cv::cann::AscendMat::upload ( InputArray  arr,
AscendStream stream 
)

upload host memory data to AscendMat (Non-Blocking call)

Member Data Documentation

◆ allocator

Allocator* cv::cann::AscendMat::allocator

allocator

◆ cols

int cv::cann::AscendMat::cols

◆ data

std::shared_ptr<uchar> cv::cann::AscendMat::data

pointer to the data

◆ dataend

const uchar* cv::cann::AscendMat::dataend

◆ datastart

uchar* cv::cann::AscendMat::datastart

helper fields used in locateROI and adjustROI

◆ flags

int cv::cann::AscendMat::flags

includes several bit-fields:

  • the magic signature
  • continuity flag
  • depth
  • number of channels

◆ rows

int cv::cann::AscendMat::rows

the number of rows and columns

◆ step

size_t cv::cann::AscendMat::step

a distance between successive rows in bytes; includes the gap if any


The documentation for this class was generated from the following file: