Agisoft Metashape > Python and Java API

RuntimeError: Unsupported format: .tif when exporting RasterTransformValue

(1/2) > >>

ppant:
Trying to export the vegetation index band
from python script and ran into this issue  RuntimeError: Unsupported format: .tif


--- Code: ---
vegetation_image = 'D:/orthomosaic_rdvi.tif'
chunk.raster_transform.formula = ["(B10-B6)/sqrt(B10+B6)"]
chunk.raster_transform.calibrateRange()
chunk.raster_transform.enabled = True
chunk.exportRaster(vegetation_image, image_format= Metashape.ImageFormatTIFF, raster_transform=Metashape.RasterTransformValue,
                                save_alpha=False)


--- End code ---

Thanks

Alexey Pasumansky:
Hello ppant,

I've just copied your code to the Console pane for the random multispectral project (had to perform chunk variable initialization, though), and it worked as expected without the reported error.

I have used 1.7.3 release version. Please check, if you observe the error on your side in the latest release version. I can also suggest to check, if the problem persists after Metashape re-start.

ppant:
Alexey,
Oho, I am using the metashape version 1.6.6 build 11715. Is that a bug there on 1.6.6 ? Not sure. As I am running several scripts with 1.6.6. it is not easy for me to update our system directly to 1.7.3. without knowing all things are working. Alexy is it possible to get the demo license. 
Thanks 

Alexey Pasumansky:
Hello ppant,

The same code worked fine in 1.6.6 version as well.

Do you observe the same behavior on any project or if the issue is specific to the certain project only? Do you observe the same problem after re-starting Metashape instance and using only the lines that you have provided for any multispectral project?

ppant:
Alexy
I observed the problem in all data.  Basically, I only posted the section of code to export the band image. Before exporting the vegetation band image I am exporting the orthomosaic, laz file that is working fine.
But when I add this section of code to export the vegetation band it just gave me an error unsupported tif format. Not sure what is causing that

Navigation

[0] Message Index

[#] Next page

Go to full version