@@ -925,6 +925,16 @@ class CV_EXPORTS Mat
925
925
*/
926
926
Mat (const Mat& m, const Range* ranges);
927
927
928
+ /* * @overload
929
+ @param m Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied
930
+ by these constructors. Instead, the header pointing to m data or its sub-array is constructed and
931
+ associated with it. The reference counter, if any, is incremented. So, when you modify the matrix
932
+ formed using such a constructor, you also modify the corresponding elements of m . If you want to
933
+ have an independent copy of the sub-array, use Mat::clone() .
934
+ @param ranges Array of selected ranges of m along each dimensionality.
935
+ */
936
+ Mat (const Mat& m, const std::vector<Range>& ranges);
937
+
928
938
/* * @overload
929
939
@param vec STL vector whose elements form the matrix. The matrix has a single column and the number
930
940
of rows equal to the number of vector elements. Type of the matrix matches the type of vector
@@ -1516,6 +1526,11 @@ class CV_EXPORTS Mat
1516
1526
*/
1517
1527
Mat operator ()( const Range* ranges ) const ;
1518
1528
1529
+ /* * @overload
1530
+ @param ranges Array of selected ranges along each array dimension.
1531
+ */
1532
+ Mat operator ()(const std::vector<Range>& ranges) const ;
1533
+
1519
1534
// //! converts header to CvMat; no data is copied
1520
1535
// operator CvMat() const;
1521
1536
// //! converts header to CvMatND; no data is copied
@@ -2054,6 +2069,8 @@ template<typename _Tp> class Mat_ : public Mat
2054
2069
Mat_ (const Mat_& m, const Rect& roi);
2055
2070
// ! selects a submatrix, n-dim version
2056
2071
Mat_ (const Mat_& m, const Range* ranges);
2072
+ // ! selects a submatrix, n-dim version
2073
+ Mat_ (const Mat_& m, const std::vector<Range>& ranges);
2057
2074
// ! from a matrix expression
2058
2075
explicit Mat_ (const MatExpr& e);
2059
2076
// ! makes a matrix out of Vec, std::vector, Point_ or Point3_. The matrix will have a single column
@@ -2123,6 +2140,7 @@ template<typename _Tp> class Mat_ : public Mat
2123
2140
Mat_ operator ()( const Range& rowRange, const Range& colRange ) const ;
2124
2141
Mat_ operator ()( const Rect& roi ) const ;
2125
2142
Mat_ operator ()( const Range* ranges ) const ;
2143
+ Mat_ operator ()(const std::vector<Range>& ranges) const ;
2126
2144
2127
2145
// ! more convenient forms of row and element access operators
2128
2146
_Tp* operator [](int y);
@@ -2227,6 +2245,7 @@ class CV_EXPORTS UMat
2227
2245
UMat (const UMat& m, const Range& rowRange, const Range& colRange=Range::all());
2228
2246
UMat (const UMat& m, const Rect& roi);
2229
2247
UMat (const UMat& m, const Range* ranges);
2248
+ UMat (const UMat& m, const std::vector<Range>& ranges);
2230
2249
// ! builds matrix from std::vector with or without copying the data
2231
2250
template <typename _Tp> explicit UMat (const std::vector<_Tp>& vec, bool copyData=false );
2232
2251
// ! builds matrix from cv::Vec; the data is copied by default
@@ -2333,6 +2352,7 @@ class CV_EXPORTS UMat
2333
2352
UMat operator ()( Range rowRange, Range colRange ) const ;
2334
2353
UMat operator ()( const Rect& roi ) const ;
2335
2354
UMat operator ()( const Range* ranges ) const ;
2355
+ UMat operator ()(const std::vector<Range>& ranges) const ;
2336
2356
2337
2357
// ! returns true iff the matrix data is continuous
2338
2358
// (i.e. when there are no gaps between successive rows).
0 commit comments