Color mapping grayscale (1 plane char) to color (4 plane char) aka False color
Hi All -
As part of a bigger patch (sound visualizer) I'm trying to map 1 plane FFT data to false color, via a lookup table stored in another matrix.
Everything can be assumed to be char, so I'd have 256 input possibilities to 256 output possibilities.
I'm either over or under-thinking the problem but either way don't have an answer.
I've looked at jit.charmap, but it's not doing quite what I want...
Any suggestions?
I've also seen this referred to as "false color", and it's a technique often used to improve contrast/readability of thermal imaging, topo maps, pretty much anything 2d with 1 variable.
Thanks!
This has been bugging me for a bit :P
jit.charmap is the way to go.
post your patch and you might get some more advice.
I needed exactly the same thing for my sonogram display but in float32.
Here is the conversion part.