[Numpy-discussion] eigenface image too dark
royG
roygeorget at gmail.com
Wed Mar 19 09:57:10 EDT 2008
> Longer solution:
> Scale your array:
> a_min = inputarray.min()
> a_max = inputarray.max()
> disp_array = ((inputarray-a_min)* 255/(a_max - a_min)).astype('uint8')\
> .
thanx Nadav..the scaling works..and makes clear images
but why .astype("uint8") ? can't i use the array of floats as it is ?
even without changing the type as uint8 the code makes clear images
when i use
disp_array = ((inputarray-a_min)* 255/(a_max - a_min))
thanks again
RG
More information about the NumPy-Discussion
mailing list