cv::cudev::GpuMat_< T > Class Template Reference CUDA 加速的计算机视觉 » 设备层


#include <opencv2/cudev/ptr2d/gpumat.hpp>

Inheritance diagram for cv::cudev::GpuMat_< T >:
cv::cuda::GpuMat

公共类型

typedef T  value_type
 

Public Member Functions

__host__  GpuMat_ ( Allocator * allocator = defaultAllocator ())
  default constructor 更多...
 
__host__  GpuMat_ (int arows, int acols, Allocator * allocator = defaultAllocator ())
  constructs GpuMat of the specified size 更多...
 
__host__  GpuMat_ ( Size asize, Allocator * allocator = defaultAllocator ())
 
__host__  GpuMat_ (int arows, int acols, Scalar val, Allocator * allocator = defaultAllocator ())
  constucts GpuMat and fills it with the specified value 更多...
 
__host__  GpuMat_ ( Size asize, Scalar val, Allocator * allocator = defaultAllocator ())
 
__host__  GpuMat_ (const GpuMat_ &m)
  copy constructor 更多...
 
__host__  GpuMat_ (const GpuMat &m, Allocator * allocator = defaultAllocator ())
  copy/conversion constructor. If m is of different type, it's converted 更多...
 
__host__  GpuMat_ (int arows, int acols, T *adata, size_t astep= Mat::AUTO_STEP )
  constructs a matrix on top of user-allocated data. step is in bytes(!!!), regardless of the type 更多...
 
__host__  GpuMat_ ( Size asize, T *adata, size_t astep= Mat::AUTO_STEP )
 
__host__  GpuMat_ (const GpuMat_ &m, Range arowRange, Range acolRange)
  selects a submatrix 更多...
 
__host__  GpuMat_ (const GpuMat_ &m, Rect roi)
 
__host__  GpuMat_ ( InputArray arr, Allocator * allocator = defaultAllocator ())
  builds GpuMat from host memory (Blocking call) 更多...
 
template<class Body >
__host__  GpuMat_ (const Expr < Body > &expr)
  expression templates 更多...
 
__host__ GpuMat_ adjustROI (int dtop, int dbottom, int dleft, int dright)
 
template<class Body >
__host__ GpuMat_ assign (const Expr < Body > &expr, Stream &stream)
 
__host__ int  channels () const
 
__host__ GpuMat_   clone () const
  overridden forms of GpuMat::row() etc. 更多...
 
__host__ GpuMat_   col (int x) const
 
__host__ GpuMat_   colRange (int startcol, int endcol) const
 
__host__ GpuMat_   colRange ( Range r) const
 
__host__ void  create (int arows, int acols)
  allocates new GpuMat data unless the GpuMat already has specified size and type 更多...
 
__host__ void  create ( Size asize)
 
__host__ int  depth () const
 
__host__ size_t  elemSize () const
  overridden forms of GpuMat::elemSize() etc. 更多...
 
__host__ size_t  elemSize1 () const
 
__host__ GpuMat_   operator() ( Range rowRange , Range colRange ) const
 
__host__ GpuMat_   operator() ( Rect roi) const
 
__host__ GpuMat_ operator= (const GpuMat_ &m)
  assignment operators 更多...
 
template<class Body >
__host__ GpuMat_ operator= (const Expr < Body > &expr)
 
__host__ T *  operator[] (int y)
  more convenient forms of row and element access operators 更多...
 
__host__ const T *  operator[] (int y) const
 
__host__ GpuMat_   row (int y) const
 
__host__ GpuMat_   rowRange (int startrow, int endrow) const
 
__host__ GpuMat_   rowRange ( Range r) const
 
__host__ size_t  step1 () const
 
__host__ size_t  stepT () const
  返回 step() /sizeof(T) 更多...
 
__host__ void  swap ( GpuMat_ &mat)
  swaps with other smart pointer 更多...
 
__host__ int  type () const
 
__host__ void  upload ( InputArray arr)
  pefroms upload data to GpuMat (Blocking call) 更多...
 
__host__ void  upload ( InputArray arr, Stream &stream)
  pefroms upload data to GpuMat (Non-Blocking call) 更多...
 
-  Public Member Functions inherited from cv::cuda::GpuMat
  GpuMat ( GpuMat::Allocator * allocator = GpuMat::defaultAllocator ())
  default constructor 更多...
 
  GpuMat (int rows , int cols , int type , GpuMat::Allocator * allocator = GpuMat::defaultAllocator ())
  constructs GpuMat of the specified size and type 更多...
 
  GpuMat ( Size size , int type , GpuMat::Allocator * allocator = GpuMat::defaultAllocator ())
 
  GpuMat (int rows , int cols , int type , Scalar s, GpuMat::Allocator * allocator = GpuMat::defaultAllocator ())
  constructs GpuMat and fills it with the specified value _s 更多...
 
  GpuMat ( Size size , int type , Scalar s, GpuMat::Allocator * allocator = GpuMat::defaultAllocator ())
 
  GpuMat (const GpuMat &m)
  copy constructor 更多...
 
  GpuMat (int rows , int cols , int type , void * data , size_t step = Mat::AUTO_STEP )
  constructor for GpuMat headers pointing to user-allocated data 更多...
 
  GpuMat ( Size size , int type , void * data , size_t step = Mat::AUTO_STEP )
 
  GpuMat (const GpuMat &m, Range rowRange , Range colRange )
  creates a GpuMat header for a part of the bigger matrix 更多...
 
  GpuMat (const GpuMat &m, Rect roi)
 
  GpuMat ( InputArray arr, GpuMat::Allocator * allocator = GpuMat::defaultAllocator ())
  builds GpuMat from host memory (Blocking call) 更多...
 
  ~GpuMat ()
  destructor - calls release() 更多...
 
GpuMat adjustROI (int dtop, int dbottom, int dleft, int dright)
  moves/resizes the current GpuMat ROI inside the parent GpuMat 更多...
 
void  assignTo ( GpuMat &m, int type =-1) const
 
int  channels () const
  returns number of channels 更多...
 
GpuMat   clone () const
  returns deep copy of the GpuMat , i.e. the data is copied 更多...
 
GpuMat   col (int x) const
  returns a new GpuMat header for the specified column 更多...
 
GpuMat   colRange (int startcol, int endcol) const
  ... for the specified column span 更多...
 
GpuMat   colRange ( Range r) const
 
void  convertTo ( OutputArray dst, int rtype) const
  converts GpuMat to another datatype (Blocking call) 更多...
 
void  convertTo ( OutputArray dst, int rtype, Stream &stream) const
  converts GpuMat to another datatype (Non-Blocking call) 更多...
 
void  convertTo ( OutputArray dst, int rtype, double alpha, double beta=0.0) const
  converts GpuMat to another datatype with scaling (Blocking call) 更多...
 
void  convertTo ( OutputArray dst, int rtype, double alpha, Stream &stream) const
  converts GpuMat to another datatype with scaling (Non-Blocking call) 更多...
 
void  convertTo ( OutputArray dst, int rtype, double alpha, double beta, Stream &stream) const
  converts GpuMat to another datatype with scaling (Non-Blocking call) 更多...
 
void  copyTo ( OutputArray dst) const
  copies the GpuMat content to device memory (Blocking call) 更多...
 
void  copyTo ( OutputArray dst, Stream &stream) const
  copies the GpuMat content to device memory (Non-Blocking call) 更多...
 
void  copyTo ( OutputArray dst, InputArray mask) const
  copies those GpuMat elements to "m" that are marked with non-zero mask elements (Blocking call) 更多...
 
void  copyTo ( OutputArray dst, InputArray mask, Stream &stream) const
  copies those GpuMat elements to "m" that are marked with non-zero mask elements (Non-Blocking call) 更多...
 
void  create (int rows , int cols , int type )
  allocates new GpuMat data unless the GpuMat already has specified size and type 更多...
 
void  create ( Size size , int type )
 
int  depth () const
  returns element type 更多...
 
void  download ( OutputArray dst) const
  Performs data download from GpuMat (Blocking call) 更多...
 
void  download ( OutputArray dst, Stream &stream) const
  Performs data download from GpuMat (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 GpuMat data is NULL 更多...
 
bool  isContinuous () const
 
void  locateROI ( Size &wholeSize, Point &ofs) const
  locates GpuMat header within a parent GpuMat 更多...
 
template<typename _Tp >
  operator PtrStep< _Tp > () const
 
template<typename _Tp >
  operator PtrStepSz< _Tp > () const
 
GpuMat   operator() ( Range rowRange , Range colRange ) const
  extracts a rectangular sub-GpuMat (this is a generalized form of row, rowRange etc.) 更多...
 
GpuMat   operator() ( Rect roi) const
 
GpuMat operator= (const GpuMat &m)
  assignment operators 更多...
 
uchar ptr (int y=0)
  returns pointer to y-th row 更多...
 
const uchar ptr (int y=0) const
 
template<typename _Tp >
_Tp *  ptr (int y=0)
  template version of the above method 更多...
 
template<typename _Tp >
const _Tp *  ptr (int y=0) const
 
void  release ()
  decreases reference counter, deallocate the data when reference counter reaches 0 更多...
 
GpuMat   reshape (int cn, int rows =0) const
 
GpuMat   row (int y) const
  returns a new GpuMat header for the specified row 更多...
 
GpuMat   rowRange (int startrow, int endrow) const
  ... for the specified row span 更多...
 
GpuMat   rowRange ( Range r) const
 
GpuMat setTo ( Scalar s)
  sets some of the GpuMat elements to s (Blocking call) 更多...
 
GpuMat setTo ( Scalar s, Stream &stream)
  sets some of the GpuMat elements to s (Non-Blocking call) 更多...
 
GpuMat setTo ( Scalar s, InputArray mask)
  sets some of the GpuMat elements to s, according to the mask (Blocking call) 更多...
 
GpuMat setTo ( Scalar s, InputArray mask, Stream &stream)
  sets some of the GpuMat elements to s, according to the mask (Non-Blocking call) 更多...
 
Size   size () const
  返回 GpuMat size : width == number of columns, height == number of rows 更多...
 
size_t  step1 () const
  returns step/elemSize1() 更多...
 
void  swap ( GpuMat &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)
  Performs data upload to GpuMat (Blocking call) 更多...
 
void  upload ( InputArray arr, Stream &stream)
  Performs data upload to GpuMat (Non-Blocking call) 更多...
 

额外继承成员

-  Static Public Member Functions inherited from cv::cuda::GpuMat
static GpuMat::Allocator defaultAllocator ()
  default allocator 更多...
 
static void  setDefaultAllocator ( GpuMat::Allocator * allocator )
 
-  Public Attributes inherited from cv::cuda::GpuMat
Allocator allocator
  allocator 更多...
 
int  cols
 
uchar data
  pointer to the data 更多...
 
const uchar dataend
 
uchar datastart
  helper fields used in locateROI and adjustROI 更多...
 
int  flags
 
int *  refcount
 
int  rows
  the number of rows and columns 更多...
 
size_t  step
  a distance between successive rows in bytes; includes the gap if any 更多...
 

Member Typedef Documentation

◆  value_type

template<typename T>
typedef T cv::cudev::GpuMat_ < T >:: value_type

Constructor & Destructor Documentation

◆  GpuMat_() [1/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( Allocator allocator = defaultAllocator () )

default constructor

◆  GpuMat_() [2/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( int  arows ,
int  acols ,
Allocator allocator = defaultAllocator ()  
)

constructs GpuMat of the specified size

◆  GpuMat_() [3/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( Size   asize ,
Allocator allocator = defaultAllocator ()  
)
explicit

◆  GpuMat_() [4/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( int  arows ,
int  acols ,
Scalar   val ,
Allocator allocator = defaultAllocator ()  
)

constucts GpuMat and fills it with the specified value

◆  GpuMat_() [5/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( Size   asize ,
Scalar   val ,
Allocator allocator = defaultAllocator ()  
)

◆  GpuMat_() [6/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( const GpuMat_ < T > &  m )

copy constructor

◆  GpuMat_() [7/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( const GpuMat m ,
Allocator allocator = defaultAllocator ()  
)
explicit

copy/conversion constructor. If m is of different type, it's converted

◆  GpuMat_() [8/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( int  arows ,
int  acols ,
T *  adata ,
size_t  astep = Mat::AUTO_STEP  
)

constructs a matrix on top of user-allocated data. step is in bytes(!!!), regardless of the type

◆  GpuMat_() [9/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( Size   asize ,
T *  adata ,
size_t  astep = Mat::AUTO_STEP  
)

◆  GpuMat_() [10/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( const GpuMat_ < T > &  m ,
Range   arowRange ,
Range   acolRange  
)

selects a submatrix

◆  GpuMat_() [11/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( const GpuMat_ < T > &  m ,
Rect   roi  
)

◆  GpuMat_() [12/13]

template<typename T>
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( InputArray   arr ,
Allocator allocator = defaultAllocator ()  
)
explicit

builds GpuMat from host memory (Blocking call)

◆  GpuMat_() [13/13]

template<typename T>
template<class Body >
__host__ cv::cudev::GpuMat_ < T >:: GpuMat_ ( const Expr < Body > &  expr )

expression templates

成员函数文档编制

◆  adjustROI()

template<typename T>
__host__ GpuMat_ & cv::cudev::GpuMat_ < T >::adjustROI ( int  dtop ,
int  dbottom ,
int  dleft ,
int  dright  
)

◆  assign()

template<typename T>
template<class Body >
__host__ GpuMat_ & cv::cudev::GpuMat_ < T >::assign ( const Expr < Body > &  expr ,
Stream stream  
)

◆  channels()

template<typename T>
__host__ int cv::cudev::GpuMat_ < T >::channels ( ) const

◆  clone()

template<typename T>
__host__ GpuMat_ cv::cudev::GpuMat_ < T >::clone ( ) const

overridden forms of GpuMat::row() etc.

◆  col()

template<typename T>
__host__ GpuMat_ cv::cudev::GpuMat_ < T >::col ( int  x ) const

◆  colRange() [1/2]

template<typename T>
__host__ GpuMat_ cv::cudev::GpuMat_ < T >::colRange ( int  startcol ,
int  endcol  
) const

◆  colRange() [2/2]

template<typename T>
__host__ GpuMat_ cv::cudev::GpuMat_ < T >::colRange ( Range   r ) const

◆  create() [1/2]

template<typename T>
__host__ void cv::cudev::GpuMat_ < T >::create ( int  arows ,
int  acols  
)

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

◆  create() [2/2]

template<typename T>
__host__ void cv::cudev::GpuMat_ < T >::create ( Size   asize )

◆  depth()

template<typename T>
__host__ int cv::cudev::GpuMat_ < T >::depth ( ) const

◆  elemSize()

template<typename T>
__host__ size_t cv::cudev::GpuMat_ < T >::elemSize ( ) const

overridden forms of GpuMat::elemSize() etc.

◆  elemSize1()

template<typename T>
__host__ size_t cv::cudev::GpuMat_ < T >::elemSize1 ( ) const

◆  operator()() [1/2]

template<typename T>
__host__ GpuMat_ cv::cudev::GpuMat_ < T >::operator() ( Range   rowRange ,
Range   colRange  
) const

◆  operator()() [2/2]

template<typename T>
__host__ GpuMat_ cv::cudev::GpuMat_ < T >::operator() ( Rect   roi ) const

◆  operator=() [1/2]

template<typename T>
__host__ GpuMat_ & cv::cudev::GpuMat_ < T >::operator= ( const GpuMat_ < T > &  m )

assignment operators

◆  operator=() [2/2]

template<typename T>
template<class Body >
__host__ GpuMat_ & cv::cudev::GpuMat_ < T >::operator= ( const Expr < Body > &  expr )

◆  operator[]() [1/2]

template<typename T>
__host__ T* cv::cudev::GpuMat_ < T >::operator[] ( int  y )

more convenient forms of row and element access operators

◆  operator[]() [2/2]

template<typename T>
__host__ const T* cv::cudev::GpuMat_ < T >::operator[] ( int  y ) const

◆  row()

template<typename T>
__host__ GpuMat_ cv::cudev::GpuMat_ < T >::row ( int  y ) const

◆  rowRange() [1/2]

template<typename T>
__host__ GpuMat_ cv::cudev::GpuMat_ < T >::rowRange ( int  startrow ,
int  endrow  
) const

◆  rowRange() [2/2]

template<typename T>
__host__ GpuMat_ cv::cudev::GpuMat_ < T >::rowRange ( Range   r ) const

◆  step1()

template<typename T>
__host__ size_t cv::cudev::GpuMat_ < T >::step1 ( ) const

◆  stepT()

template<typename T>
__host__ size_t cv::cudev::GpuMat_ < T >::stepT ( ) const

返回 step() /sizeof(T)

◆  swap()

template<typename T>
__host__ void cv::cudev::GpuMat_ < T >::swap ( GpuMat_ < T > &  mat )

swaps with other smart pointer

◆  type()

template<typename T>
__host__ int cv::cudev::GpuMat_ < T >::type ( ) const

◆  upload() [1/2]

template<typename T>
__host__ void cv::cudev::GpuMat_ < T >::upload ( InputArray   arr )

pefroms upload data to GpuMat (Blocking call)

◆  upload() [2/2]

template<typename T>
__host__ void cv::cudev::GpuMat_ < T >::upload ( InputArray   arr ,
Stream stream  
)

pefroms upload data to GpuMat (Non-Blocking call)


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