I would like to use speckle lee refined filter on Sentinel-1 collection. But in every document I found, it says that the input should be linear not in dB. Normally S-1 data in GEE is in dB.
How do I convert it to linear?
Couldn't find any code for that.
var filter = ee.Filter.and(
ee.Filter.bounds(Map.getBounds(true)),
ee.Filter.date('2022-01-01', '2022-02-01')
)
var db = ee.ImageCollection('COPERNICUS/S1_GRD')
.filter(filter)
.mosaic()
// How do I covert db to linear?
Map.addLayer(db, {bands: 'VV,VH,VV', min: -25, max: 0})
https://code.earthengine.google.com/e9c1de10f5b32f56f8a3857ebbadc4c5
Best Answer
You can covert an S1 image in db to linear with this:
However, there are two image collections with S1 imagery, and one of them (
COPERNICUS/S1_GRD_FLOAT
) already comes in linear. Here's a complete example showing conversion back and forth from db to linear:https://code.earthengine.google.com/a57f1bef88f429abe73529844d219ae8