How are pictures pre processed before being used as ML data
First images are turned into pixel values. If it is a color image we have RGB combination of values. It it is black and white then the pixel values for each image in the dataset are unsigned integers in the range between black and white, or 0 and 255. This is the first transformation into numbers.
After that we apply an embedding to it to convert it into an array of numbers. We then use this embedding for further processing.
Images cannot directly be used because AI/ML algorithm deals with numbers only.
You may want to take a simpler image base like the MNIST which is a simple 0-9 representation on a 28*28 pixel image and then play around with recognition algorithms for a better understanding.