top of page

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()
 
 
 

最新記事

すべて表示
PythonでYAHOO検索もスクレイピング

前回Google検索結果のTOP100取ったのでYAHOOも追加。 YAHOOは10件ずつしか取れないので注意! #!/usr/bin/env python3 # -*- coding: utf-8 -*- # 指定のURLをブラウザで開く #...

 
 
 

Comments


記事: Blog2_Post

©2021 by 日々Python。Wix.com で作成されました。

bottom of page