Hi,
You could use the ColorMapping application :
- create your LUT file, in the following format :
0 200 200 200
1 200 200 200
[...]
7 85 85 85
8 85 85 85
[...]
- apply the color mapping , the output image pixel type should be set
to an integer type
- use the ExtractROI application to select only one channel as the
ColorMapping always uses 3 bands in output
Alternatively, with the BandMath application you could use the following formula :
"(im1b1>=0)*(im1b1<7)*200 + (im1b1>=7)*(im1b1<11)*85 + etc" Regards, Guillaume Le 04/04/2014 19:20, pixelpusher a écrit :
I've found that BandMath will accept multiple nested if statements. So I've been able to accomplish my reclass with if(im1b1==0,200,if(im1b1==7,85,if(im1b1==11,125,0))) etc., using 128 "if" conditions and lots of parentheses.It works, but it's ugly. If someone knows a more elegant solution, I'd be grateful to hear it!On Friday, April 4, 2014 4:13:38 PM UTC+1, pixelpusher wrote: How can I perform a simple reclassification on a single-band image, using the values in a lookup table? For example, I want all pixels between 0 and 6 to be assigned a value of 200, pixels 7-10 to become 85, pixels 11-20 to become 125, etc. I can see how to create binary images with Threshold or BandMath, and I can use Color Mapping to change RGB display values. But I need to assign 128 different values and save the result as a geoTIFF. I'm running Monteverdi 1.20.0 in Windows 7, but I'll use command-line OTB in Linux if necessary. Sorry if there's an obvious answer to this question--I'm completely new to OTB! -- -- 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] <mailto:[email protected]>.For more options, visit https://groups.google.com/d/optout.
-- <www.c-s.fr> *Guillaume PASERO* Ingénieur d'études et développement*Business Unit E-SPACE & Geo Information* <https://thor.si.c-s.fr/blogs/cs-blogs-business/>*- Département APPLICATIONS*
*CS Systèmes d'Information* Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872 31506 Toulouse Cedex 05 - FRANCE +33 561 17 64 21 - [email protected] -- -- 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.
<<inline: logo_cs.png>>
