我试图通过将 4GB 的 ENVI 图像转换为 PNG 图像(即 RGB 文件)来可视化它。根据 .hdr 头文件,执行此操作的默认波段是:{55, 41, 12}
但是,我正在使用gdal_translate;作为回应,我得到了一张带有一些空白风险的黑色图像。
我正在使用以下命令行:
gdal_translate -of PNG D:\files\hdr\image D:\file\hdr\test.png -b 55 -b 41 -b 12
我做错了什么?我试图改变波段的顺序,放置选项-ot Byte,-ot Uint16,但没有成功......
我也尝试过使用 java 语言转换此图像,但也没有成功。如有必要,我也可以将我的源代码放在这里。
更新 1
图像的完整信息是(通过使用 gdalinfo):
Driver: ENVI/ENVI .hdr Labelled
Files: D:\files\hdr\image
D:\files\hdr\image.hdr
PROJCS["UTM_Zone_19S",
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_84",6378137.0,298.257223563]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000.0],
PARAMETER["False_Northing",10000000.0],
PARAMETER["Central_Meridian",-69.0],
PARAMETER["Scale_Factor",0.9996],
PARAMETER["Latitude_Of_Origin",0.0],
UNIT["Meter",1]]
Origin = (320055.641999999990000,6309280.342000000200000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
Band_100=Resize (band*100 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.770900)
Band_101=Resize (band 101 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.774500)
......
[%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.767300)
Band_9=Resize (band 9 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.440300)
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 320055.642, 6309280.342) ( 70d56' 0.93"W, 33d20'26.27"S)
Lower Left ( 320055.642, 6308398.842) ( 70d56' 1.56"W, 33d20'54.88"S)
Upper Right ( 324115.142, 6309280.342) ( 70d53'23.97"W, 33d20'28.69"S)
Lower Right ( 324115.142, 6308398.842) ( 70d53'24.58"W, 33d20'57.30"S)
Center ( 322085.392, 6308839.592) ( 70d54'42.76"W, 33d20'41.79"S)
Band 1 Block=8119x1 Type=UInt16, ColorInterp=Undefined
Description = Resize (band 1 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.411200)
Metadata:
wavelength=0.411200
Band 2 Block=8119x1 Type=UInt16, ColorInterp=Undefined
Description = Resize (band 2 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.414800)
Metadata:
wavelength=0.414800
...
Band 11 Block=8119x1 Type=UInt16, ColorInterp=Undefined
Description = Resize (band 11 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.447500)
Metadata:
wavelength=0.447500
Band 12 Block=8119x1 Type=UInt16, ColorInterp=Undefined
Description = Resize (band 12 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.451200)
Metadata:
wavelength=0.451200
....
Band 41 Block=8119x1 Type=UInt16, ColorInterp=Undefined
Description = Resize (band 41 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.556500)
Metadata:
wavelength=0.556500
Band 42 Block=8119x1 Type=UInt16, ColorInterp=Undefined
Description = Resize (band 42 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.560200)
Metadata:
wavelength=0.560200
....
Band 54 Block=8119x1 Type=UInt16, ColorInterp=Undefined
Description = Resize (band 54 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.603800)
Metadata:
wavelength=0.603800
Band 55 Block=8119x1 Type=UInt16, ColorInterp=Undefined
Description = Resize (band 55 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.607400)
Metadata:
wavelength=0.607400
...
Band 160 Block=8119x1 Type=UInt16, ColorInterp=Undefined
Description = Resize (band*160 refl [%*100]:citricos_02_VNIR_1600_SN0010_raw_rad_atm_geo.bsq) (0.988900)
Metadata:
wavelength=0.988900
由于正文限制,我省略了一些信息。