Class cv::cann::AscendMat#

#include <opencv2/cann.hpp>

Collaboration diagram for cv::cann::AscendMat:

Constructor & Destructor Documentation#

AscendMat()#

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

default constructor

AscendMat()#

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

copy constructor

AscendMat()#

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

constructs AscendMat by crop a certain area from another

AscendMat()#

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

AscendMat()#

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

builds AscendMat from host memory (Blocking call)

AscendMat()#

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

constructs AscendMat of the specified size and type

AscendMat()#

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()#

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

constructs AscendMat of the specified size and type

AscendMat()#

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

Member Function Documentation#

defaultAllocator()#

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

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

setDefaultAllocator()#

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

Set allocator for AscendMat.

Parameters

  • allocator

channels()#

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

returns number of channels

convertTo()#

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

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

convertTo()#

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

converts AscendMat to another datatype (Blocking call)

convertTo()#

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

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

depth()#

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

returns element type

download()#

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

download data from AscendMat to host (Blocking call)

download()#

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

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

elemSize()#

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

returns element size in bytes

elemSize1()#

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

returns the size of element channel in bytes

empty()#

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

returns true if AscendMat data is NULL

isContinuous()#

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

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

setTo()#

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

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

setTo()#

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

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

setTo()#

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

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

setTo()#

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()

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

step1()#

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

returns step/elemSize1()

swap()#

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

swaps with other smart pointer

type()#

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

returns element type

updateContinuityFlag()#

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

internal use method: updates the continuity flag

upload()#

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

upload host memory data to AscendMat (Blocking call)

upload()#

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

Source file#

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