TIF取得からの画像表示
- hiro2studio
- 2021年1月27日
- 読了時間: 1分
データ化したTIF画像をmatplotlibにて画面に表示。昨日のコードに追記。
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import datetime
import tif_get as tg
import matplotlib.pyplot as plt
#-------------------------------------------------
## main ###
#-------------------------------------------------
if __name__=='__main__':
tiffname = "input.tif"
# クラス利用
dc = tg.data_get()
# TIFFデータ取得
outtiff = dc.get_tiff_data(tiffname)
if outtiff is None:
print("tiff read error")
print(outtiff)
# 画像表示
plt.imshow(outtiff,cmap="gist_gray", vmin=-10, vmax=256)
plt.colorbar()
plt.show()
Comments