The problem with this is that it brings to the table all the minuses of the c language.
Opencv mat documentation.
Generated on mon sep 28 2020 02 12 30 gmt opencv 4 4 0 295 g19f4cc57c1.
4 3 0 zip 80 6 mb.
Master 4 x 3 4 3 4 x 2 4 2 4 x doxygen html.
And while the newly allocated arrays are always continuous you still need to check the destination array because mat create does not always allocate a new matrix.
In those days the library was built around a c interface and to store the image in the memory they used a c structure called iplimage.
This is the one you ll see in most of the older tutorials and educational materials.
Generated on fri oct 2 2020 06 35 28 gmt opencv 4 4 0 326 ga3e7c2d8e3.
Another opencv idiom in this function a call of mat create for the destination array that allocates the destination array unless it already has the proper size and type.
4 4 0 zip 80 9 mb tar xz 57 4 mb.
Generated on sat oct 3 2020 10 44 50 for opencv by 1 8 13 1 8 13.