#include <ocl.hpp>
Public Member Functions | |
oclMat () | |
default constructor More... | |
oclMat (int rows, int cols, int type) | |
constructs oclMatrix of the specified size and type (_type is CV_8UC1, CV_64FC3, CV_32SC(12) etc.) More... | |
oclMat (Size size, int type) | |
oclMat (int rows, int cols, int type, const Scalar &s) | |
constucts oclMatrix and fills it with the specified value _s. More... | |
oclMat (Size size, int type, const Scalar &s) | |
oclMat (const oclMat &m) | |
copy constructor More... | |
oclMat (int rows, int cols, int type, void *data, size_t step=Mat::AUTO_STEP) | |
constructor for oclMatrix headers pointing to user-allocated data More... | |
oclMat (Size size, int type, void *data, size_t step=Mat::AUTO_STEP) | |
oclMat (const oclMat &m, const Range &rowRange, const Range &colRange) | |
creates a matrix header for a part of the bigger matrix More... | |
oclMat (const oclMat &m, const Rect &roi) | |
oclMat (const Mat &m) | |
builds oclMat from Mat. Perfom blocking upload to device. More... | |
~oclMat () | |
destructor - calls release() More... | |
oclMat & | operator= (const oclMat &m) |
assignment operators More... | |
oclMat & | operator= (const Mat &m) |
assignment operator. Perfom blocking upload to device. More... | |
oclMat & | operator= (const oclMatExpr &expr) |
void | upload (const cv::Mat &m) |
pefroms blocking upload data to oclMat. More... | |
operator Mat () const | |
downloads data from device to host memory. Blocking calls. More... | |
void | download (cv::Mat &m) const |
operator _InputArray () | |
convert to _InputArray More... | |
operator _OutputArray () | |
convert to _OutputArray More... | |
oclMat | row (int y) const |
returns a new oclMatrix header for the specified row More... | |
oclMat | col (int x) const |
returns a new oclMatrix header for the specified column More... | |
oclMat | rowRange (int startrow, int endrow) const |
... for the specified row span More... | |
oclMat | rowRange (const Range &r) const |
oclMat | colRange (int startcol, int endcol) const |
... for the specified column span More... | |
oclMat | colRange (const Range &r) const |
oclMat | clone () const |
returns deep copy of the oclMatrix, i.e. the data is copied More... | |
void | copyTo (oclMat &m, const oclMat &mask=oclMat()) const |
copies those oclMatrix elements to "m" that are marked with non-zero mask elements. More... | |
void | convertTo (oclMat &m, int rtype, double alpha=1, double beta=0) const |
converts oclMatrix to another datatype with optional scalng. See cvConvertScale. More... | |
void | assignTo (oclMat &m, int type=-1) const |
oclMat & | operator= (const Scalar &s) |
sets every oclMatrix element to s More... | |
oclMat & | setTo (const Scalar &s, const oclMat &mask=oclMat()) |
sets some of the oclMatrix elements to s, according to the mask More... | |
oclMat | reshape (int cn, int rows=0) const |
creates alternative oclMatrix header for the same data, with different More... | |
void | create (int rows, int cols, int type) |
allocates new oclMatrix data unless the oclMatrix already has specified size and type. More... | |
void | create (Size size, int type) |
void | createEx (int rows, int cols, int type, DevMemRW rw_type, DevMemType mem_type) |
allocates new oclMatrix with specified device memory type. More... | |
void | createEx (Size size, int type, DevMemRW rw_type, DevMemType mem_type) |
void | release () |
decreases reference counter; More... | |
void | swap (oclMat &mat) |
swaps with other smart pointer More... | |
void | locateROI (Size &wholeSize, Point &ofs) const |
locates oclMatrix header within a parent oclMatrix. See below More... | |
oclMat & | adjustROI (int dtop, int dbottom, int dleft, int dright) |
moves/resizes the current oclMatrix ROI inside the parent oclMatrix. More... | |
oclMat | operator() (Range rowRange, Range colRange) const |
extracts a rectangular sub-oclMatrix More... | |
oclMat | operator() (const Rect &roi) const |
oclMat & | operator+= (const oclMat &m) |
oclMat & | operator-= (const oclMat &m) |
oclMat & | operator*= (const oclMat &m) |
oclMat & | operator/= (const oclMat &m) |
bool | isContinuous () const |
returns true if the oclMatrix data is continuous More... | |
size_t | elemSize () const |
returns element size in bytes, More... | |
size_t | elemSize1 () const |
returns the size of element channel in bytes. More... | |
int | type () const |
returns element type, similar to CV_MAT_TYPE(cvMat->type) More... | |
int | ocltype () const |
int | depth () const |
returns element type, similar to CV_MAT_DEPTH(cvMat->type) More... | |
int | channels () const |
returns element type, similar to CV_MAT_CN(cvMat->type) More... | |
int | oclchannels () const |
size_t | step1 () const |
returns step/elemSize1() More... | |
Size | size () const |
returns oclMatrix size: More... | |
bool | empty () const |
returns true if oclMatrix data is NULL More... | |
oclMat | t () const |
matrix transposition More... | |
Public Attributes | |
int | flags |
includes several bit-fields: More... | |
int | rows |
the number of rows and columns More... | |
int | cols |
size_t | step |
a distance between successive rows in bytes; includes the gap if any More... | |
uchar * | data |
pointer to the data(OCL memory object) More... | |
int * | refcount |
pointer to the reference counter; More... | |
uchar * | datastart |
helper fields used in locateROI and adjustROI More... | |
uchar * | dataend |
Context * | clCxt |
OpenCL context associated with the oclMat object. More... | |
int | offset |
int | wholerows |
int | wholecols |
cv::ocl::oclMat::oclMat | ( | ) |
default constructor
constructs oclMatrix of the specified size and type (_type is CV_8UC1, CV_64FC3, CV_32SC(12) etc.)
constucts oclMatrix and fills it with the specified value _s.
cv::ocl::oclMat::oclMat | ( | const oclMat & | m | ) |
copy constructor
cv::ocl::oclMat::oclMat | ( | int | rows, |
int | cols, | ||
int | type, | ||
void * | data, | ||
size_t | step = Mat::AUTO_STEP |
||
) |
constructor for oclMatrix headers pointing to user-allocated data
cv::ocl::oclMat::oclMat | ( | Size | size, |
int | type, | ||
void * | data, | ||
size_t | step = Mat::AUTO_STEP |
||
) |
creates a matrix header for a part of the bigger matrix
|
explicit |
cv::ocl::oclMat::~oclMat | ( | ) |
destructor - calls release()
assignment operator. Perfom blocking upload to device.
oclMat & cv::ocl::oclMat::operator= | ( | const oclMatExpr & | expr | ) |
cv::ocl::oclMat::operator Mat | ( | ) | const |
downloads data from device to host memory. Blocking calls.
cv::ocl::oclMat::operator _InputArray | ( | ) |
convert to _InputArray
cv::ocl::oclMat::operator _OutputArray | ( | ) |
convert to _OutputArray
... for the specified column span
oclMat cv::ocl::oclMat::clone | ( | ) | const |
returns deep copy of the oclMatrix, i.e. the data is copied
copies those oclMatrix elements to "m" that are marked with non-zero mask elements.
converts oclMatrix to another datatype with optional scalng. See cvConvertScale.
sets some of the oclMatrix elements to s, according to the mask
creates alternative oclMatrix header for the same data, with different
allocates new oclMatrix data unless the oclMatrix already has specified size and type.
void cv::ocl::oclMat::createEx | ( | int | rows, |
int | cols, | ||
int | type, | ||
DevMemRW | rw_type, | ||
DevMemType | mem_type | ||
) |
allocates new oclMatrix with specified device memory type.
void cv::ocl::oclMat::createEx | ( | Size | size, |
int | type, | ||
DevMemRW | rw_type, | ||
DevMemType | mem_type | ||
) |
void cv::ocl::oclMat::release | ( | ) |
decreases reference counter;
locates oclMatrix header within a parent oclMatrix. See below
moves/resizes the current oclMatrix ROI inside the parent oclMatrix.
extracts a rectangular sub-oclMatrix
bool cv::ocl::oclMat::isContinuous | ( | ) | const |
returns true if the oclMatrix data is continuous
size_t cv::ocl::oclMat::elemSize | ( | ) | const |
returns element size in bytes,
size_t cv::ocl::oclMat::elemSize1 | ( | ) | const |
returns the size of element channel in bytes.
int cv::ocl::oclMat::type | ( | ) | const |
returns element type, similar to CV_MAT_TYPE(cvMat->type)
int cv::ocl::oclMat::ocltype | ( | ) | const |
returns element type, i.e. 8UC3 returns 8UC4 because in ocl 3 channels element actually use 4 channel space
int cv::ocl::oclMat::depth | ( | ) | const |
returns element type, similar to CV_MAT_DEPTH(cvMat->type)
int cv::ocl::oclMat::channels | ( | ) | const |
returns element type, similar to CV_MAT_CN(cvMat->type)
int cv::ocl::oclMat::oclchannels | ( | ) | const |
returns element type, return 4 for 3 channels element, becuase 3 channels element actually use 4 channel space
size_t cv::ocl::oclMat::step1 | ( | ) | const |
returns step/elemSize1()
Size cv::ocl::oclMat::size | ( | ) | const |
returns oclMatrix size:
bool cv::ocl::oclMat::empty | ( | ) | const |
returns true if oclMatrix data is NULL
oclMat cv::ocl::oclMat::t | ( | ) | const |
matrix transposition
int cv::ocl::oclMat::flags |
includes several bit-fields:
int cv::ocl::oclMat::rows |
the number of rows and columns
int cv::ocl::oclMat::cols |
size_t cv::ocl::oclMat::step |
a distance between successive rows in bytes; includes the gap if any
uchar* cv::ocl::oclMat::data |
pointer to the data(OCL memory object)
int* cv::ocl::oclMat::refcount |
pointer to the reference counter;
uchar* cv::ocl::oclMat::datastart |
helper fields used in locateROI and adjustROI
uchar* cv::ocl::oclMat::dataend |
int cv::ocl::oclMat::offset |
int cv::ocl::oclMat::wholerows |
int cv::ocl::oclMat::wholecols |