
在进行ENVI图像的裁剪时,总是提示参数不完整,文件名无效,改了也没好,怎么解决

关注让阿豪来帮你解答,本回答参考chatgpt3.5编写提供,如果还有疑问可以评论或留言可能出现这个问题的原因有很多,以下是一些可能的解决办法:
; Open the ENVI application
e = envi()
; Open an image file
file = 'C:\path\to\input\file'
raster = e.openraster(file)
; Define the output file path and name
out_file = 'C:\path\to\output\file'
; Set the band and spatial subset parameters
bands = [0, 1, 2]
subset = {X: [100, 200], Y: [100, 200]}
; Create a new raster containing the cropped region
cropped_raster = raster.subset(bands=bands, subset=subset)
; Save the cropped raster to disk
cropped_raster.save, out_file