Closed kryptan closed 7 years ago
@kryptan
Thanks for providing detailed feedback. If you are willing, can you send a PR to the forge library with the changes ? :)
@kryptan & @pavanky Can you please check the changes i made to spectrum color map in the below PR. https://github.com/arrayfire/forge/pull/123
@9prady9 I have no idea about this :) but please make sure the places you are picking these from are licensed appropriately.
@kryptan Any suggestions for improving (0) - Grayscale color map ?
Colormaps are defined in src/backend/cmap.hpp in sRGB colorspace.
Default (gray) colormap is defined by linearly increasing gray values. This linear increase happens in the sRGB colorspace. One should probably use linearly increasing values in a perceptually uniform colorspace so that e.g. 0.8 is perceptually 2x brighter than 0.4. For gray values sRGB is close so it is not a big deal but something better should probably be used.
Spectrum. Its name suggests that it represents spectral colors. However pure spectral colors lie outside of the sRGB colorspace (as can be seen from the CIE chromaticity diagram for sRGB) and thus cannot be displayed on most modern monitors. The best thing we can do here is probably to take some interval, e.g. 400nm - 700nm, so that value 0.0 will correspondent to 400nm, 1.0 to 700nm and calculate sRGB colors closest to the spectral ones on this interval. I have not done this but I think that currently specified colormap is nowhere near it (maybe it is, but it must be verified).
Colors. Comment says "pure colors" without any clarification of what does it mean. This colormap has different flaws. First of all it is not perceptually uniform, there are almost flat areas interleaved with abrupt changes. Also it contains colors of different brightness even though it looks like it was meant not to.
Red. This looks legit.
Mood. This looks legit.
Heat. It is defined only by 64 points and there is no interpolation between them, this results in a very noticeable banding. It is also highly perceptually non-uniform.
Blue. There is an abrupt change in this one near 200.
I suggest to add colormaps designed for matplotlib and remove of fix others.
It is important to have good colormaps, e.g. when bad colormaps are used in medicine they can lead to misdiagnosis.