0
我想顯示使用Python和MatPlotLib灰度TIFF文件,閱讀TIFF Python和Matplotlib使用GDAL
到目前爲止,我已閱讀本文件:
import scipy as N
import gdal
import sys
import matplotlib.pyplot as pyplot
try:
tif = gdal.Open('filename.tif')
tifArray = tif.ReadAsArray()
except:
print 'The file does not exist.'
sys.exit(0)
band1 = tif.GetRasterBand(1)
band2 = tif.GetRasterBand(2)
band3 = tif.GetRasterBand(3)
band1Array = band1.ReadAsArray()
band2Array = band2.ReadAsArray()
band3Array = band3.ReadAsArray()
但後來我不我不知道我還應該做什麼...我很無能。 任何人都可以幫助我嗎?