モノクロ
プログラム(Python)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
#-*- coding:utf-8 -*- import cv2 import numpy as np # load image (grayscale) # 入力画像をグレースケールで読み込み gray = cv2.imread("LegoFamilyGray.jpg", 0) # Spatial filtering dst = cv2.blur(gray, ksize=(3, 3)) # output # 結果を出力 cv2.imshow("output", dst) cv2.waitKey(0) cv2.destroyAllWindows() |
データファイル
実行結果
元画像

変換後
