I have a grayscale image, I would like to split it into pixels and determine the grayscale in each pixel of the image. The array is needed in the following form: (pixel by X, pixel by Y, gray shade 0-255).
1,1,25;
1,2,36;
1,3,50;
.
.
.
50,60,96;
.
.
.
if the image is 500 by 600 dots, then at the end it should get - (500,600, grayscale).
Could you tell me please, how can I get such an array of data from an image? What do I need to do? Which libraries should I use? If there is someone who has solved such a problem, please give an example. Thank you very much!