Here is an interesting practical problem that I encountered, tinkering with color quantization and image compression.
The basic idea is that I need a program to which I give a picture, and it reduces the number of colors as much as possible without my comment. Since each person has a different sensitivity of the eye (and the eyes have different sensitivity of the intensity of red / green / blue), it should be possible to somehow determine this threshold of sensitivity.
In other words, in the truecolor image, replace each pixel color with a different color so that:
- The total number of different colors in the picture would be the smallest; and
- Each new pixel will have a color no further from the original color than the user-defined value D.
D can be defined in different ways, choose your favorite. For example:
- Separate red, green and blue components to determine the maximum possible deviation for each of them (for each pixel you get a rectangular cuboid of permissible replacement values);
- A real number that will represent the maximum allowable distance in the RGB cube (for each pixel you get the scope of the allowable replacement values);
- Something between them or something completely different.
Vilx-
source share