Well I'm trying to normalize some (infrared) thermography data, to display it later.
However I'm stuck at normalizing, I could of course do it by hand, but I wonder why the matplotlib code is not working, the python code is shown below:
import numpy as N
import matplotlib.colors as colors
test2 = N.array([100, 10, 95])
norm = colors.Normalize(0,100)
for pix in N.nditer(test2, op_flags=['readwrite']):
val = (norm.process_value(pix)[0])
print (val)
img = norm.process_value(test2)[0]
print(img)
Now I expect vals OR img to show the correct processed data. Depending on what matplotlib.colors.Normalize.process_value actually should get as argument.
But in any case: both functions do not normalize and just return the original function.. Not on the [0, 1] interval at all.