PILによる画像リサイズ&イコライズ
画像処理のイコライジングメモ。
PIL_test.py
from PIL import Image
from PIL import ImageOps
import numpy as np
#画像ファイルオープン
fpath = "./main.jpg"
imgorig = Image.open(fpath)
#リサイズ
imgresize = imgorig.resize((256,256), Image.NEAREST )
#平均化
img2 = ImageOps.equalize(imgresize)
#numpy配列へ
arr = np.array(img2)
print(arr)
#平均化前後を表示
imgresize.show()
img2.show()
Author And Source
この問題について(PILによる画像リサイズ&イコライズ), 我々は、より多くの情報をここで見つけました https://qiita.com/airnanasi_qiita/items/3052f30fdaec0ceb708b著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .