1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #9034 from sovrasov:mats_from_initializer_list

Add constructors taking initializer_list for some of OpenCV data types (#9034)

* Add a constructor taking initializer_list for Matx

* Add a constructor taking initializer list for Mat and Mat_

* Add one more method to initialize Mat to the corresponding tutorial

* Add a note how to initialize Matx

* CV_CXX_11->CV_CXX11
This commit is contained in:
Vladislav Sovrasov
2017-07-14 20:17:09 +03:00
committed by Alexander Alekhin
parent 11626fe32c
commit e5fbb4f5d2
9 changed files with 118 additions and 15 deletions
@@ -192,10 +192,12 @@ object in multiple ways:
![](images/MatBasicContainerOut3.png)
- For small matrices you may use comma separated initializers:
- For small matrices you may use comma separated initializers or initializer lists (C++11 support is required in the last case):
@snippet mat_the_basic_image_container.cpp comma
@snippet mat_the_basic_image_container.cpp list
![](images/MatBasicContainerOut6.png)
- Create a new header for an existing *Mat* object and @ref cv::Mat::clone or @ref cv::Mat::copyTo it.