I am interested in processing data from images, but so far I have only written code that performs posterisation on a greyscale image, the easiest way I thought of approaching this is to find the average colour of an image. This may even be too simple but I thought that writing this up would be a good idea because the most simple, but first steps are normally the hardest to take.
Basically all this code does is to add up all the red values, all the blue values and all the green values and then divide that by the total number of pixels, therefore giving you an average RGB value.
As you can see below I used Pillow in python.

Have a nice day :)
Comments