Hello,

I have been writing code for a paper and I'm reading an image in RGB space in OpenCV which means that its read as a 3D matrix (HEIGHT x WIDTH x 3 (RGB) ).

I'm flattening the image into a 2D matrix ( NB_PIXELS x 3 (RGB) ) using this code :

image = image.reshape(len(image) * len(image[0]), len(image[0][0]))

This flattening process is an important step in the method that I'm going over in the paper.

Since I can't have the paper depend on a library like NumPy I would like a more elegant way to explain the flattening. Are there any papers that I can reference or any equations, methods ..etc that I can use as a replacement to the code that I shared?

Thank you!

More Mohamed Benkedadra's questions See All
Similar questions and discussions