Hello World / plɹoM ollǝH

Programmers Live in Vain

2020-02-24から1日間の記事一覧

cv2 frost glass in python

ガウスブラーをかけるだけ Input Output img = cv2.imread("lena.png") img = cv2.GaussianBlur(img, (127, 127), 0) cv2.imwrite("result.png", img)

cv2 voronoi mosaic in python

Python版のサンプルが意外となかったのでメモ Input Output import cv2 import numpy as np def voronoi_facets(in_img, in_k): h, w = in_img.shape[0], in_img.shape[1] subdiv = cv2.Subdiv2D() subdiv.initDelaunay((0, 0, w, h)) points = np.append(np…