Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: Christina K on June 12, 2019, 12:55:08 PM

Title: Raster transform python multiple bands
Post by: Christina K on June 12, 2019, 12:55:08 PM
Hi,

I need to export a multispectral image as reflectance with python. I am able to use a single band expression in the raster calculator in python but in this case I would like to export multiple bands.

It is unclear how to add more output bands to the expression in python. Is this possible? It is working correctly in the GUI see attached screenshot.

Thanks in advance

Title: Re: Raster transform python multiple bands
Post by: Alexey Pasumansky on June 12, 2019, 09:26:12 PM
Hello Christina,

You can pass the list of expressions to be used as outer bands:
Code: [Select]
Metashape.app.document.chunk.raster_transform.formula = ["B1/32768", "B2/32768", "B3/32768"]