Hot colormap does not match Octave/Matlab (Bug #4254)
Description
Octave updated the Hot colormap to match Matlab back in 2013.
I noticed this on Android with OCV 2.4.10, but confirmed that the issue exists in the master branch as well.
Octave moved the transition points from 2/5 and 4/5 to 3/8 and 6/8, respectively.
My Android code to replicate these colormaps with a LinearGradient:
// New octave:
return getDrawable(new int[] {0xFF000000, 0xFFFF0000, 0xFFFFFF00, 0xFFFFFFFF}, new float[] {0f, 3/8f, 6/8f, 1f});
// Current OCV:
return getDrawable(new int[] {0xFF000000, 0xFFFF0000, 0xFFFFFF00, 0xFFFFFFFF}, new float[] {0f, 2/5f, 4/5f, 1f});
Moreover, the current colormaps seem to simply be hard-coded values rather than functions.
Is there a reason for that?
History
Updated by Christopher Boyd almost 10 years ago
Octave change log:
http://hg.savannah.gnu.org/hgweb/octave/rev/6964e6b92fc1
Updated by Vadim Pisarevsky almost 10 years ago
- Category set to imgproc, video
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4957