Re: transform a floating point into byte or integer in envi [message #56387] |
Wed, 24 October 2007 08:45 |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
Nuno Vila�a wrote:
> dear all,
>
> i have some raster datasets created in arcmap that were later
> converted into tiff so that they could be read by envi, which doesn't
> happen since envi doesn' display correctly these images as they appear
> all in white. these images should have a grey scale of 0 to 1. other
> visualization software such as multispec or irfan view are capable of
> reading these images correctly.
> i have been told that i should either transform these images into byte
> with a scale from 0 - 200 or either to integer with a scale of 0 - 10
> 000, but i simply have no idea of how to do it... does anyone have a
> clue andcan help me out?
> thank you!
>
> nuno
>
if you want it from 0 to 255 you can use the function bytscl()
Otherwise, it is fairly easy to do it manually.
So 0-> 0, 1-> 200 (or 10 000, whatever)
so your transformation equation would be y = 200 x + 0
so you have your image between 0 and 1, simply do
ScaledImage = image * 200
But again, this is just a visualization problem and you can display it
properly in Envi with little effort... open your image then use the
"enhance" menu.
Jean
|
|
|
|