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 4 0 zip 80 9 mb tar xz 57 4 mb.
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.
Generated on sat oct 3 2020 10 44 50 for opencv by 1 8 13 1 8 13.
3 4 11 zip 75 9 mb tar xz 54 2 mb.
Public mat int rows int cols int type java nio bytebuffer data long step mat public mat size size int type mat public mat int sizes int type mat public.
Master 4 x 3 4 3 4 x 2 4 2 4 x doxygen html.
Opencv has been around since 2001.
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.