Saving an image as a matrix

Hello there, kodular brothers

I’m an electrical engineer student, I want to make an app for my hardware that can do image processing. I know there are easier methods if I used a pc but, for portablity’s sake I want to make smartphone app.

My question is, is there any method that I can use to save Images as a matrix form containing the pixels intensity values?

Any help is much appreciated.

Put the picture in a Canvas backgroud, then create a loop for each line of the image that takes the pixel, star with (y0,x0) when your loop arrive the end of this line, sum 1 in Vertical Axis(Y). And so on until you reach the bottom of the image.

1 Like

thank you , I will try it as soon as possible. one last question. are there any exensions that could help with image processing? such as doing fourier transform, adding noise or obtaining the histogram… etc.

thanks again

You are going to need an extension for that. The solution @Enmanuel_Sojo proposed works but it will take several minutes to process even a low resolution image. I did that some time ago to convert images to greyscale and is extremely slow to read pixel x pixel.

1 Like

If you are trying to do AI, try this Introduction to Machine Learning: Image Classification

1 Like

I tried using a canvas and as @ Italo said, it was very slow which will cause a high delay in my output. It seems I have to build my own app using a programming language.

I hope this discussion will inspire exensions developers to build one for Image processing.
As it’s a field with increasing importance.

Thank you all for your help