cv::MatIterator_< _Tp > Class Template Reference 核心功能 » 基本结构


Matrix read-write iterator. 更多...

#include <opencv2/core/mat.hpp>

Inheritance diagram for cv::MatIterator_< _Tp >:
cv::MatConstIterator_< _Tp > cv::MatConstIterator

公共类型

typedef std::random_access_iterator_tag  iterator_category
 
typedef _Tp *  pointer
 
typedef _Tp &  reference
 
-  Public Types inherited from cv::MatConstIterator_< _Tp >
typedef ptrdiff_t  difference_type
 
typedef std::random_access_iterator_tag  iterator_category
 
typedef const _Tp *  pointer
 
typedef const _Tp &  reference
 
typedef _Tp  value_type
 
-  Public Types inherited from cv::MatConstIterator
typedef ptrdiff_t  difference_type
 
typedef std::random_access_iterator_tag  iterator_category
 
typedef const uchar **  pointer
 
typedef uchar reference
 
typedef uchar value_type
 

Public Member Functions

  MatIterator_ ()
  the default constructor 更多...
 
  MatIterator_ ( Mat_ < _Tp > *_m)
  constructor that sets the iterator to the beginning of the matrix 更多...
 
  MatIterator_ ( Mat_ < _Tp > *_m, int _row, int _col=0)
  constructor that sets the iterator to the specified element of the matrix 更多...
 
  MatIterator_ ( Mat_ < _Tp > *_m, Point _pt)
  constructor that sets the iterator to the specified element of the matrix 更多...
 
  MatIterator_ ( Mat_ < _Tp > *_m, const int *_idx)
  constructor that sets the iterator to the specified element of the matrix 更多...
 
  MatIterator_ (const MatIterator_ &it)
  copy constructor 更多...
 
_Tp &  operator* () const
  returns the current matrix element 更多...
 
MatIterator_ operator++ ()
  increments the iterator 更多...
 
MatIterator_   operator++ (int)
  increments the iterator 更多...
 
MatIterator_ operator+= (ptrdiff_t ofs)
  shifts the iterator forward by the specified number of elements 更多...
 
MatIterator_ operator-- ()
  decrements the iterator 更多...
 
MatIterator_   operator-- (int)
  decrements the iterator 更多...
 
MatIterator_ operator-= (ptrdiff_t ofs)
  shifts the iterator backward by the specified number of elements 更多...
 
MatIterator_ operator= (const MatIterator_ < _Tp > &it)
  copy operator 更多...
 
_Tp &  operator[] (ptrdiff_t i) const
  returns the i-th matrix element, relative to the current 更多...
 
-  Public Member Functions inherited from cv::MatConstIterator_< _Tp >
  MatConstIterator_ ()
  default constructor 更多...
 
  MatConstIterator_ (const Mat_ < _Tp > *_m)
  constructor that sets the iterator to the beginning of the matrix 更多...
 
  MatConstIterator_ (const Mat_ < _Tp > *_m, int _row, int _col=0)
  constructor that sets the iterator to the specified element of the matrix 更多...
 
  MatConstIterator_ (const Mat_ < _Tp > *_m, Point _pt)
  constructor that sets the iterator to the specified element of the matrix 更多...
 
  MatConstIterator_ (const Mat_ < _Tp > *_m, const int *_idx)
  constructor that sets the iterator to the specified element of the matrix 更多...
 
  MatConstIterator_ (const MatConstIterator_ &it)
  copy constructor 更多...
 
const _Tp &  operator* () const
  returns the current matrix element 更多...
 
MatConstIterator_ operator++ ()
  increments the iterator 更多...
 
MatConstIterator_   operator++ (int)
  increments the iterator 更多...
 
MatConstIterator_ operator+= (ptrdiff_t ofs)
  shifts the iterator forward by the specified number of elements 更多...
 
MatConstIterator_ operator-- ()
  decrements the iterator 更多...
 
MatConstIterator_   operator-- (int)
  decrements the iterator 更多...
 
MatConstIterator_ operator-= (ptrdiff_t ofs)
  shifts the iterator backward by the specified number of elements 更多...
 
MatConstIterator_ operator= (const MatConstIterator_ &it)
  copy operator 更多...
 
const _Tp &  operator[] (ptrdiff_t i) const
  returns the i-th matrix element, relative to the current 更多...
 
Point   pos () const
  returns the current iterator position 更多...
 
-  Public Member Functions inherited from cv::MatConstIterator
  MatConstIterator ()
  default constructor 更多...
 
  MatConstIterator (const Mat *_m)
  constructor that sets the iterator to the beginning of the matrix 更多...
 
  MatConstIterator (const Mat *_m, int _row, int _col=0)
  constructor that sets the iterator to the specified element of the matrix 更多...
 
  MatConstIterator (const Mat *_m, Point _pt)
  constructor that sets the iterator to the specified element of the matrix 更多...
 
  MatConstIterator (const Mat *_m, const int *_idx)
  constructor that sets the iterator to the specified element of the matrix 更多...
 
  MatConstIterator (const MatConstIterator &it)
  copy constructor 更多...
 
ptrdiff_t  lpos () const
 
const uchar operator* () const
  returns the current matrix element 更多...
 
MatConstIterator operator++ ()
  increments the iterator 更多...
 
MatConstIterator   operator++ (int)
  increments the iterator 更多...
 
MatConstIterator operator+= (ptrdiff_t ofs)
  shifts the iterator forward by the specified number of elements 更多...
 
MatConstIterator operator-- ()
  decrements the iterator 更多...
 
MatConstIterator   operator-- (int)
  decrements the iterator 更多...
 
MatConstIterator operator-= (ptrdiff_t ofs)
  shifts the iterator backward by the specified number of elements 更多...
 
MatConstIterator operator= (const MatConstIterator &it)
  copy operator 更多...
 
const uchar operator[] (ptrdiff_t i) const
  returns the i-th matrix element, relative to the current 更多...
 
Point   pos () const
  returns the current iterator position 更多...
 
void  pos (int *_idx) const
  returns the current iterator position 更多...
 
void  seek (ptrdiff_t ofs, bool relative=false)
 
void  seek (const int *_idx, bool relative=false)
 

额外继承成员

-  Public Attributes inherited from cv::MatConstIterator
size_t  elemSize
 
const Mat m
 
const uchar ptr
 
const uchar sliceEnd
 
const uchar sliceStart
 

详细描述

template<typename _Tp>
class cv::MatIterator_< _Tp >

Matrix read-write iterator.

Member Typedef Documentation

◆  iterator_category

template<typename _Tp>
typedef std::random_access_iterator_tag cv::MatIterator_ < _Tp >:: iterator_category

◆  pointer

template<typename _Tp>
typedef _Tp* cv::MatIterator_ < _Tp >:: pointer

◆  reference

template<typename _Tp>
typedef _Tp& cv::MatIterator_ < _Tp >:: reference

Constructor & Destructor Documentation

◆  MatIterator_() [1/6]

template<typename _Tp>
cv::MatIterator_ < _Tp >:: MatIterator_ ( )

the default constructor

◆  MatIterator_() [2/6]

template<typename _Tp>
cv::MatIterator_ < _Tp >:: MatIterator_ ( Mat_ < _Tp > *  _m )

constructor that sets the iterator to the beginning of the matrix

◆  MatIterator_() [3/6]

template<typename _Tp>
cv::MatIterator_ < _Tp >:: MatIterator_ ( Mat_ < _Tp > *  _m ,
int  _row ,
int  _col = 0  
)

constructor that sets the iterator to the specified element of the matrix

◆  MatIterator_() [4/6]

template<typename _Tp>
cv::MatIterator_ < _Tp >:: MatIterator_ ( Mat_ < _Tp > *  _m ,
Point   _pt  
)

constructor that sets the iterator to the specified element of the matrix

◆  MatIterator_() [5/6]

template<typename _Tp>
cv::MatIterator_ < _Tp >:: MatIterator_ ( Mat_ < _Tp > *  _m ,
const int *  _idx  
)

constructor that sets the iterator to the specified element of the matrix

◆  MatIterator_() [6/6]

template<typename _Tp>
cv::MatIterator_ < _Tp >:: MatIterator_ ( const MatIterator_ < _Tp > &  it )

copy constructor

成员函数文档编制

◆  operator*()

template<typename _Tp>
_Tp& cv::MatIterator_ < _Tp >::operator* ( ) const

returns the current matrix element

◆  operator++() [1/2]

template<typename _Tp>
MatIterator_ & cv::MatIterator_ < _Tp >::operator++ ( )

increments the iterator

◆  operator++() [2/2]

template<typename _Tp>
MatIterator_ cv::MatIterator_ < _Tp >::operator++ ( int  )

increments the iterator

◆  operator+=()

template<typename _Tp>
MatIterator_ & cv::MatIterator_ < _Tp >::operator+= ( ptrdiff_t  ofs )

shifts the iterator forward by the specified number of elements

◆  operator--() [1/2]

template<typename _Tp>
MatIterator_ & cv::MatIterator_ < _Tp >::operator-- ( )

decrements the iterator

◆  operator--() [2/2]

template<typename _Tp>
MatIterator_ cv::MatIterator_ < _Tp >::operator-- ( int  )

decrements the iterator

◆  operator-=()

template<typename _Tp>
MatIterator_ & cv::MatIterator_ < _Tp >::operator-= ( ptrdiff_t  ofs )

shifts the iterator backward by the specified number of elements

◆  operator=()

template<typename _Tp>
MatIterator_ & cv::MatIterator_ < _Tp >::operator= ( const MatIterator_ < _Tp > &  it )

copy operator

◆  operator[]()

template<typename _Tp>
_Tp& cv::MatIterator_ < _Tp >::operator[] ( ptrdiff_t  i ) const

returns the i-th matrix element, relative to the current


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