You are reading a single comment by @moocher and its replies. Click here to read the full conversation.
  • I want to pixilate an image, reducing the number of colours too. This is easy enough to do, but then I want to know what the underlying colours for each square are. So the result would look something like this:


    1 Attachment

    • Untitled.jpg
  • Meaning, you want the average colour for each square? According to this link, taking the root mean square of all RGB values (per channel) should give you a good 'average colour'. If you then want to only know the actual colour hue, you could convert the RGB values into the HSV colour space (hue/saturation/value) and look at hue numbers only. If you set up a list of 'main colours' that correspond to a range of hues each, you can end up with something like your proposed result.

  • Pretty late to the game, but if your image editor can save files in a .ppm file format, you could reduce your image to 40x40 pixels, save as a .ppm, then open the file in a text editor, or even excel.

    .ppm is a text based image file format

About

Avatar for moocher @moocher started