OpenCV  4.1.1-pre
Open Source Computer Vision
Looking for a C++ dev who knows OpenCV?
I'm looking for work. Hire me!
cv::MatIterator_< _Tp > Class Template Reference

Matrix read-write iterator. More...

#include <opencv2/core/mat.hpp>

Inheritance diagram for cv::MatIterator_< _Tp >:
Collaboration diagram for cv::MatIterator_< _Tp >:

Public Types

typedef ptrdiff_t difference_type
 
typedef std::random_access_iterator_tag iterator_category
 
typedef _Tp * pointer
 
typedef _Tp & reference
 
typedef _Tp value_type
 

Public Member Functions

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

Public Attributes

size_t elemSize
 
const Matm
 
const ucharptr
 
const ucharsliceEnd
 
const ucharsliceStart
 

Detailed Description

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

Matrix read-write iterator.

Member Typedef Documentation

◆ difference_type

template<typename _Tp>
typedef ptrdiff_t cv::MatConstIterator_< _Tp >::difference_type
inherited

◆ 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

◆ value_type

template<typename _Tp>
typedef _Tp cv::MatConstIterator_< _Tp >::value_type
inherited

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

Member Function Documentation

◆ lpos()

ptrdiff_t cv::MatConstIterator::lpos ( ) const
inherited

◆ 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

◆ pos() [1/2]

void cv::MatConstIterator::pos ( int *  _idx) const
inherited

returns the current iterator position

◆ pos() [2/2]

template<typename _Tp>
Point cv::MatConstIterator_< _Tp >::pos ( ) const
inherited

returns the current iterator position

◆ seek() [1/2]

void cv::MatConstIterator::seek ( ptrdiff_t  ofs,
bool  relative = false 
)
inherited

◆ seek() [2/2]

void cv::MatConstIterator::seek ( const int *  _idx,
bool  relative = false 
)
inherited

Member Data Documentation

◆ elemSize

size_t cv::MatConstIterator::elemSize
inherited

◆ m

const Mat* cv::MatConstIterator::m
inherited

◆ ptr

const uchar* cv::MatConstIterator::ptr
inherited

◆ sliceEnd

const uchar* cv::MatConstIterator::sliceEnd
inherited

◆ sliceStart

const uchar* cv::MatConstIterator::sliceStart
inherited

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