1

I have a question concerning gdal_calc.

I´m running windows 7 64b and am working from the OSGeo4W shell. I have multispectral images that need to be prepared for analysis but they are not saved in a single band per wavelength format. Instead each wavelength is saved in a tif 8b format and this needs to be converted to a 16b tif format with a single band. The data is stored in the green and blue bands and a formula is available to calculate the new band. Images are acquired with Tetracam Mini-MCA system and more details can be found here.

So my question is: how to use gdal_calc to batch process images?

The only manual solution I found is separating the bands using gdal_translate and repeating the calculations for each image separately.

  • Sorry but I may not quite understand. Do you have now one tiff which has, for example, 7 bands. Each band presents one wavelength range with 8 bit bit depth, and you want to convert that multichannel tif into 7 separate single-band tiffs with 16 bit bit depth. Is this your aim? – user30184 Sep 4 '14 at 10:21
  • Let me clarify. Each band is a separate 8 bit tif. But the data is saved in the green and blue band, This is done because the software used can not store a tif 10 bit. However using the information in the two bands a 10 bit image can be reconstructed in a single band. To ad a bit more information, the images used are shot with a Tetracam Mini MCA. – fjboogert Sep 5 '14 at 8:38
  • Interesting. Is the 8-bit tif a three band RGB image with a dummy red band? – user30184 Sep 5 '14 at 8:55
  • This seems to be the case. When opened with Qgis it indeed shows one band that is completely empty (or black). – fjboogert Sep 5 '14 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.