Raul ZM <[email protected]> wrote: > > Hi there, > > we are trying to transform a float32 tiff image into a uint8 (so from > decimals to the interval 0 to 255). > For this we have tested Convert: > olbcli_Convert -in file1.tiff -out file2.tif uint8 -type linear (btw, what > would be type "none"?) > > and Rescale: > otbcli_Rescale -in file1.tiff -out file2.tif uint8 -outmin 0 -outmax 255 > (also tried without the last three parameters as these are the default > values) > > in both cases we get blank images or an stripped image that has nothing to do > with the original file. > Any idea/suggestion of what might be going on? >
Hi, Images with stripes can appear due to streaming (or multi-threading, I am not sure) because the min/max values for the input image are not computed globally. I guess that you can avoid that by using the -ram option for streaming. But if you know the range of your input image, the easiest is to use the BandMath application to do the operation and choose the output pixel value: otbcli_BandMath -il float.tif -out rescaled.tif uint8 -exp "(im1b1-min)/(max-min)*255" If you have several bands, you will have to adapt the expression. Jordi -- -- Check the OTB FAQ at http://www.orfeo-toolbox.org/FAQ.html You received this message because you are subscribed to the Google Groups "otb-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/otb-users?hl=en --- You received this message because you are subscribed to the Google Groups "otb-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
