OpenCV 5.0.0
Open Source Computer Vision
読み込み中...
検索中...
見つかりません
🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
cv::MatShape 構造体

行列/テンソルの形状を表す。以前は MatShape はstd::vector<int>のエイリアスとして定義されていたが、現在はいくつかの追加の利点を提供する特別な構造体を使用している: 続き...

#include <opencv2/core/mat.hpp>

Collaboration diagram for cv::MatShape:

公開型

enum  { MAX_DIMS =10 }
 

公開メンバ関数

 MatShape ()
 
template<class _It >
 MatShape (_It begin, _It end)
 
 MatShape (const int *begin, const int *end, DataLayout layout=DATA_LAYOUT_UNKNOWN, int C=0)
 
 MatShape (const MatShape &shape)
 
 MatShape (const std::vector< int > &shape, DataLayout layout=DATA_LAYOUT_UNKNOWN, int C=0)
 
 MatShape (int dims, int value, DataLayout layout=DATA_LAYOUT_UNKNOWN)
 
 MatShape (size_t dims, const int *sizes=nullptr, DataLayout layout=DATA_LAYOUT_UNKNOWN, int C=0)
 
 MatShape (size_t dims, int value, DataLayout layout=DATA_LAYOUT_UNKNOWN)
 
 MatShape (std::initializer_list< int > shape)
 
template<class _It >
void assign (_It begin, _It end)
 
void assign (const int *begin, const int *end)
 
void assign (int newSize, int value)
 
void assign (size_t newSize, int value)
 
void assign_ (const int *begin, const int *end)
 
int & back ()
 
const int & back () const
 
int * begin ()
 
const int * begin () const
 
int channels () const
 
void clear ()
 
int * data ()
 
const int * data () const
 
void emplace_back (int value)
 
bool empty () const
 
int * end ()
 
const int * end () const
 
void erase (int *where)
 
MatShape expand (const MatShape &another) const
 
bool hasSymbols () const
 
template<class _It >
void insert (int *where, _It begin, _It end)
 
void insert (int *where, const int *begin, const int *end)
 
void insert (int *where, int count, int value)
 
void insert (int *where, int value)
 
void insert (int *where, size_t count, int value)
 
void insert_ (int *where, const int *begin, const int *end)
 
bool isScalar () const
 
Size operator() () const
 
MatShapeoperator= (const MatShape &shape)
 
int & operator[] (size_t idx)
 
const int & operator[] (size_t idx) const
 
void push_back (int value)
 
void reserve (size_t maxSize)
 
void resize (size_t newSize, int value=0)
 
size_t size () const
 
std::string str () const
 
MatShape toLayout (DataLayout newLayout, int C0=0) const
 
size_t total () const
 
std::vector< int > vec () const
 

静的公開メンバ関数

static MatShape scalar ()
 

公開変数類

int C
 
int dims
 
DataLayout layout
 
int p [MAX_DIMS]
 

詳細説明

行列/テンソルの形状を表す。以前は MatShape はstd::vector<int>のエイリアスとして定義されていたが、現在はいくつかの追加の利点を提供する特別な構造体を使用している:

  1. 形状は単純な配列に格納されるため、ヒープ操作を一切回避できる。これにより形状推論などのオーバーヘッドが削減される。
  2. レイアウトに関する情報を含む。これにはブロックレイアウトの場合の実際のチャンネル数('C')も含まれる。
  3. 空の形状(total() == 0)と0次元の形状(dims == 0だが total() == 1)を区別する。

列挙型メンバ詳解

◆ anonymous enum

anonymous enum
列挙値
MAX_DIMS 

構築子と解体子の詳解

◆ MatShape() [1/9]

cv::MatShape::MatShape ( )

◆ MatShape() [2/9]

cv::MatShape::MatShape ( size_t dims,
const int * sizes = nullptr,
DataLayout layout = DATA_LAYOUT_UNKNOWN,
int C = 0 )
explicit

◆ MatShape() [3/9]

cv::MatShape::MatShape ( size_t dims,
int value,
DataLayout layout = DATA_LAYOUT_UNKNOWN )
explicit

◆ MatShape() [4/9]

cv::MatShape::MatShape ( int dims,
int value,
DataLayout layout = DATA_LAYOUT_UNKNOWN )
explicit

◆ MatShape() [5/9]

cv::MatShape::MatShape ( const std::vector< int > & shape,
DataLayout layout = DATA_LAYOUT_UNKNOWN,
int C = 0 )
explicit

◆ MatShape() [6/9]

cv::MatShape::MatShape ( const int * begin,
const int * end,
DataLayout layout = DATA_LAYOUT_UNKNOWN,
int C = 0 )
explicit

◆ MatShape() [7/9]

cv::MatShape::MatShape ( std::initializer_list< int > shape)
explicit

◆ MatShape() [8/9]

cv::MatShape::MatShape ( const MatShape & shape)

◆ MatShape() [9/9]

template<class _It >
cv::MatShape::MatShape ( _It begin,
_It end )

メンバ関数詳解

◆ assign() [1/4]

template<class _It >
void cv::MatShape::assign ( _It begin,
_It end )

◆ assign() [2/4]

void cv::MatShape::assign ( const int * begin,
const int * end )

◆ assign() [3/4]

void cv::MatShape::assign ( int newSize,
int value )

◆ assign() [4/4]

void cv::MatShape::assign ( size_t newSize,
int value )

◆ assign_()

void cv::MatShape::assign_ ( const int * begin,
const int * end )

◆ back() [1/2]

int & cv::MatShape::back ( )

◆ back() [2/2]

const int & cv::MatShape::back ( ) const

◆ begin() [1/2]

int * cv::MatShape::begin ( )

◆ begin() [2/2]

const int * cv::MatShape::begin ( ) const

◆ channels()

int cv::MatShape::channels ( ) const

◆ clear()

void cv::MatShape::clear ( )

◆ data() [1/2]

int * cv::MatShape::data ( )

◆ data() [2/2]

const int * cv::MatShape::data ( ) const

◆ emplace_back()

void cv::MatShape::emplace_back ( int value)

◆ empty()

bool cv::MatShape::empty ( ) const

◆ end() [1/2]

int * cv::MatShape::end ( )

◆ end() [2/2]

const int * cv::MatShape::end ( ) const

◆ erase()

void cv::MatShape::erase ( int * where)

◆ expand()

MatShape cv::MatShape::expand ( const MatShape & another) const

◆ hasSymbols()

bool cv::MatShape::hasSymbols ( ) const

◆ insert() [1/5]

template<class _It >
void cv::MatShape::insert ( int * where,
_It begin,
_It end )

◆ insert() [2/5]

void cv::MatShape::insert ( int * where,
const int * begin,
const int * end )

◆ insert() [3/5]

void cv::MatShape::insert ( int * where,
int count,
int value )

◆ insert() [4/5]

void cv::MatShape::insert ( int * where,
int value )

◆ insert() [5/5]

void cv::MatShape::insert ( int * where,
size_t count,
int value )

◆ insert_()

void cv::MatShape::insert_ ( int * where,
const int * begin,
const int * end )

◆ isScalar()

bool cv::MatShape::isScalar ( ) const

◆ operator()()

Size cv::MatShape::operator() ( ) const

◆ operator=()

MatShape & cv::MatShape::operator= ( const MatShape & shape)

◆ operator[]() [1/2]

int & cv::MatShape::operator[] ( size_t idx)

◆ operator[]() [2/2]

const int & cv::MatShape::operator[] ( size_t idx) const

◆ push_back()

void cv::MatShape::push_back ( int value)

◆ reserve()

void cv::MatShape::reserve ( size_t maxSize)

◆ resize()

void cv::MatShape::resize ( size_t newSize,
int value = 0 )

◆ scalar()

static MatShape cv::MatShape::scalar ( )
static

◆ size()

size_t cv::MatShape::size ( ) const

◆ str()

std::string cv::MatShape::str ( ) const

◆ toLayout()

MatShape cv::MatShape::toLayout ( DataLayout newLayout,
int C0 = 0 ) const

◆ total()

size_t cv::MatShape::total ( ) const

◆ vec()

std::vector< int > cv::MatShape::vec ( ) const

メンバ変数詳解

◆ C

int cv::MatShape::C

◆ dims

int cv::MatShape::dims

◆ layout

DataLayout cv::MatShape::layout

◆ p

int cv::MatShape::p[MAX_DIMS]

この構造体詳解は次のファイルから抽出されました: