OpenCV453
公開型 | 公開メンバ関数 | 公開変数類 | 全メンバ一覧

公開型

using SizeArray = std::vector< int >
 
using StepArray = std::vector< size_t >
 
using IndexArray = std::vector< int >
 

公開メンバ関数

 ~GpuMatND ()
 destructor
 
 GpuMatND ()
 default constructor
 
 GpuMatND (SizeArray size, int type)
 
 GpuMatND (SizeArray size, int type, void *data, StepArray step=StepArray())
 
void create (SizeArray size, int type)
 Allocates GPU memory. Suppose there is some GPU memory already allocated. In that case, this method may choose to reuse that GPU memory under the specific condition: it must be of the same size and type, not externally allocated, the GPU memory is continuous(i.e., isContinuous() is true), and is not a sub-matrix of another GpuMatND (i.e., isSubmatrix() is false). In other words, this method guarantees that the GPU memory allocated by this method is always continuous and is not a sub-region of another GpuMatND.
 
void release ()
 
void swap (GpuMatND &m) noexcept
 
GpuMatND clone () const
 Creates a full copy of the array and the underlying data. The method creates a full copy of the array. It mimics the behavior of Mat::clone(), i.e. the original step is not taken into account. So, the array copy is a continuous array occupying total()*elemSize() bytes.
 
GpuMatND clone (Stream &stream) const
 
GpuMatND operator() (const std::vector< Range > &ranges) const
 Extracts a sub-matrix. The operator makes a new header for the specified sub-array of *this. The operator is an O(1) operation, that is, no matrix data is copied. [詳解]
 
GpuMat createGpuMatHeader (IndexArray idx, Range rowRange, Range colRange) const
 Creates a GpuMat header for a 2D plane part of an n-dim matrix. [詳解]
 
GpuMat createGpuMatHeader () const
 
GpuMat operator() (IndexArray idx, Range rowRange, Range colRange) const
 Extracts a 2D plane part of an n-dim matrix. It differs from createGpuMatHeader(IndexArray, Range, Range) in that it clones a part of this GpuMatND to the returned GpuMat. [詳解]
 
 operator GpuMat () const
 Extracts a 2D plane part of an n-dim matrix if this GpuMatND is effectively 2D. It differs from createGpuMatHeader() in that it clones a part of this GpuMatND. [詳解]
 
 GpuMatND (const GpuMatND &)=default
 
GpuMatNDoperator= (const GpuMatND &)=default
 
 GpuMatND (GpuMatND &&) noexcept=default
 
GpuMatNDoperator= (GpuMatND &&) noexcept=default
 
void upload (InputArray src)
 
void upload (InputArray src, Stream &stream)
 
void download (OutputArray dst) const
 
void download (OutputArray dst, Stream &stream) const
 
bool isContinuous () const
 
bool isSubmatrix () const
 returns true if the matrix is a sub-matrix of another matrix
 
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 data is null
 
bool external () const
 returns true if not empty and points to external(user-allocated) gpu memory
 
uchar * getDevicePtr () const
 returns pointer to the first byte of the GPU memory
 
size_t total () const
 returns the total number of array elements
 
size_t totalMemSize () const
 returns the size of underlying memory in bytes
 
int type () const
 returns element type
 

公開変数類

int flags
 
int dims
 matrix dimensionality
 
SizeArray size
 shape of this array
 
StepArray step
 

構築子と解体子

◆ GpuMatND() [1/2]

cv::cuda::GpuMatND::GpuMatND ( SizeArray  size,
int  type 
)

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。

引数
sizeArray of integers specifying an n-dimensional array shape.
typeArray type. Use CV_8UC1, ..., CV_16FC4 to create 1-4 channel matrices, or CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.

◆ GpuMatND() [2/2]

cv::cuda::GpuMatND::GpuMatND ( SizeArray  size,
int  type,
void *  data,
StepArray  step = StepArray() 
)

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。

引数
sizeArray of integers specifying an n-dimensional array shape.
typeArray type. Use CV_8UC1, ..., CV_16FC4 to create 1-4 channel matrices, or CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
dataPointer to the user data. Matrix constructors that take data and step parameters do not allocate matrix data. Instead, they just initialize the matrix header that points to the specified data, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it.
stepArray of _size.size()-1 steps in case of a multi-dimensional array (the last step is always set to the element size). If not specified, the matrix is assumed to be continuous.

関数詳解

◆ clone()

GpuMatND cv::cuda::GpuMatND::clone ( Stream stream) const

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。 This overload is non-blocking, so it may return even if the copy operation is not finished.

◆ createGpuMatHeader() [1/2]

GpuMat cv::cuda::GpuMatND::createGpuMatHeader ( ) const

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。 Creates a GpuMat header if this GpuMatND is effectively 2D.

覚え書き
The returned GpuMat is constructed with the constructor for user-allocated data. That is, It does not perform reference counting.
This function does not increment this GpuMatND's reference counter.

◆ createGpuMatHeader() [2/2]

GpuMat cv::cuda::GpuMatND::createGpuMatHeader ( IndexArray  idx,
Range  rowRange,
Range  colRange 
) const

Creates a GpuMat header for a 2D plane part of an n-dim matrix.

覚え書き
The returned GpuMat is constructed with the constructor for user-allocated data. That is, It does not perform reference counting.
This function does not increment this GpuMatND's reference counter.

◆ isContinuous()

bool cv::cuda::GpuMatND::isContinuous ( ) const

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

◆ operator GpuMat()

cv::cuda::GpuMatND::operator GpuMat ( ) const

Extracts a 2D plane part of an n-dim matrix if this GpuMatND is effectively 2D. It differs from createGpuMatHeader() in that it clones a part of this GpuMatND.

覚え書き
This operator does not increment this GpuMatND's reference counter;

◆ operator()() [1/2]

GpuMatND cv::cuda::GpuMatND::operator() ( const std::vector< Range > &  ranges) const

Extracts a sub-matrix. The operator makes a new header for the specified sub-array of *this. The operator is an O(1) operation, that is, no matrix data is copied.

引数
rangesArray of selected ranges along each dimension.

◆ operator()() [2/2]

GpuMat cv::cuda::GpuMatND::operator() ( IndexArray  idx,
Range  rowRange,
Range  colRange 
) const

Extracts a 2D plane part of an n-dim matrix. It differs from createGpuMatHeader(IndexArray, Range, Range) in that it clones a part of this GpuMatND to the returned GpuMat.

覚え書き
This operator does not increment this GpuMatND's reference counter;

メンバ詳解

◆ flags

int cv::cuda::GpuMatND::flags

includes several bit-fields:

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

◆ step

StepArray cv::cuda::GpuMatND::step

step values Their semantics is identical to the semantics of step for Mat.


このクラス詳解は次のファイルから抽出されました: