opencv
2.2.0
|
#include <core.hpp>
Public Member Functions | |
void | init (const Mat **arrays, Mat *planes, int narrays=-1) |
the separate iterator initialization method | |
NAryMatIterator () | |
the default constructor | |
NAryMatIterator (const Mat **arrays, Mat *planes, int narrays=-1) | |
the full constructor taking arbitrary number of n-dim matrices | |
NAryMatIterator & | operator++ () |
proceeds to the next plane of every iterated matrix | |
NAryMatIterator | operator++ (int) |
proceeds to the next plane of every iterated matrix (postfix increment operator) | |
Public Attributes | |
const Mat ** | arrays |
the iterated arrays | |
int | narrays |
the number of arrays | |
int | nplanes |
the number of planes in each array | |
Mat * | planes |
the current planes | |
Protected Attributes | |
int | idx |
int | iterdepth |
n-Dimensional Dense Matrix Iterator Class.
The class cv::NAryMatIterator is used for iterating over one or more n-dimensional dense arrays (cv::Mat's).
The iterator is completely different from cv::Mat_ and cv::SparseMat_ iterators. It iterates through the slices (or planes), not the elements, where "slice" is a continuous part of the arrays.
Here is the example on how the iterator can be used to normalize 3D histogram:
You can iterate through several matrices simultaneously as long as they have the same geometry (dimensionality and all the dimension sizes are the same), which is useful for binary and n-ary operations on such matrices. Just pass those matrices to cv::MatNDIterator. Then, during the iteration it.planes[0], it.planes[1], ... will be the slices of the corresponding matrices
cv::NAryMatIterator::NAryMatIterator | ( | ) |
the default constructor
the full constructor taking arbitrary number of n-dim matrices
the separate iterator initialization method
NAryMatIterator& cv::NAryMatIterator::operator++ | ( | ) |
proceeds to the next plane of every iterated matrix
NAryMatIterator cv::NAryMatIterator::operator++ | ( | int | ) |
proceeds to the next plane of every iterated matrix (postfix increment operator)
const Mat** cv::NAryMatIterator::arrays |
the iterated arrays
|
protected |
|
protected |
int cv::NAryMatIterator::narrays |
the number of arrays
int cv::NAryMatIterator::nplanes |
the number of planes in each array
Mat* cv::NAryMatIterator::planes |
the current planes