Hot colormap does not match Octave/Matlab (Bug #4254)


Added by Christopher Boyd almost 10 years ago. Updated over 9 years ago.


Status:New Start date:2015-03-25
Priority:Low Due date:
Assignee:- % Done:

0%

Category:imgproc, video
Target version:2.4.11
Affected version:branch 'master' (3.0-dev) Operating System:Any
Difficulty:Easy HW Platform:Any
Pull request:

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 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

Also available in: Atom PDF