Hi,

I have the attached raster which is the output of a cloud masking algorithm 
and would like to produce a binary mask from it.
I was thinking that I could use the following syntax to set for example all 
pixel==2 to 1 and the rest to 0. 

otbcli_BandMath -il 
S2A_OPER_MSI_L1C_TL_SGS__20161003T232748_A006704_T60GTU_cloud_mask.img -out 
test.tif uint8 -exp "im1b1==2 ? 1 : 0"

The output tif however comprises only missing values.

Ideally I would like to set all pixel which are equal to 2 or 4 or 5 to 1 
and the rest to 0 like this:
otbcli_BandMath -il 
S2A_OPER_MSI_L1C_TL_SGS__20161003T232748_A006704_T60GTU_cloud_mask.img -out 
test.tif uint8 -exp "im1b1==2 or im1b1==4 or im1b1==5 ? 1 : 0"
...which of course doesn't work neither.

Maybe somebody has an idea what is wrong with the syntax or the input data?

Cheers,
André

-- 
-- 
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.

Reply via email to