The introduction of a colormap with a definite but variable number of entries can make it easier to create useful colormaps instead of handling thousands of iteration values separately. A precondition for this is that the entries of the colormap are mapped to relevant areas in the range of iteration values, which contribute to significant parts of the final image. If the sequence of colors in the colormap is mapped to comparably relevant portions of the sequence of increasing iteration values, the color gradient of the colormap is smoothly mapped to the resulting areas of the image.
To achieve such a mapping the potentially huge number of iterations values must be mapped to entries in the colormap. This is some kind of compression. In the past we had quite a lot of different mappings, according to the evolving findings and identified cases of the coloring problem: for example Cyclic, Linear, Exponential and area-related. The current version of the browser features only two basic types that provide the best mapping results for all kinds of images. The browser allows to select the different methods prior to loading an image.
To play with different mappings and mapping parameters in combination with different colormap sizes all those settings can be changed while displaying an image. The results will be visible just after changing a setting.
The Cyclic Approach
For historical reasons, and because it is very simple to implement, at first the cyclic approach was implemented. Here the increasing iteration values are directly assigned to colormap entries in a round robin manner (modulo). If the end of the colormap is reached, it is continued again with the first entry -- starting with the lowest iteration value, until the highest one is reached.
If you choose this method you will quickly see the effect of statistical noise near the edge of the mandelbrot set as described earlier. Neverthless, depending on the colormap size and kind of the area quite interesting effects can be achieved choosing this method.
The Statistical Approach
The best results can be achieved, if ranges of less important iteration values are jointly assigned to single entries in the colormap for the sake of those values covering larger portions of the image to get their own entries. This guarantees that the relevance of the different colormap entries for the look of the image is comparably equal. Such a colormap can then be easily adapted to emphasize dedicated areas of the image without the need to bother with large sequences of nearly equal colors.There are two flavors available for such a statistical mapping approach:
- The method called Statistic compresses the range of iteration values to the size of the currently used colormap.
- The method called Optimal oberserves an area hint to find an optimal mapping without being limited by the size of the current colormap. Therefore it is able to resize the colormap according to the found requirements.
The Colormap ResizerEspecially when playing maually with the colormap size and, surely, for the optimal mapping methods, colormaps can be resized without loosing the characteristic of its color gradient. Therefore there are three different possibilites that can be preselected:
- Preserve the color gradient. The relative position of a color value in the colormap will be preserved for the resulting colormap.
- Preserve the color locations in the currently shown image. Here the current image mapping will be taken into account. The assignment of a a color entry to the middle of the iteration value range it is used for is preserved.
- Preserve only the mapping of the maintained interpolation points used to calculate the colormap, instead of each entry separately.
Especially the statistical methods work pretty good. While in the past we desinged colormaps for single areas, now it is possible to design colormaps that match nearly all areas without any modification. They are quite reusable. Checkout the colormap cm2.2.1 and you will see that it can be used for a wide range of areas to achieve pretty good results without any manual interaction. Surely, with some fine-tuning it could still be improved, but even this is much less work, compared with the earlier procedures.
As a consequence of this, the image database today contains mainly only raster files instead of fully colored images. Just choose your favorite colormap, select the statistic mapping and start browsing.
Tip: check out colormap cm2.2.1. It provides good results for nearly all images.