もう裏技かどうか関係ないような気もしてきましたが、乱数で迷路を描いてみることにします。 年賀状のネタにしようかな。迷路って何となくヘビっぽいし... 別冊だったころのマイコンBASICマガジンとか読んで理解した (あー歳がー) 迷路生成法の「壁延ばし法」を微かな記憶を頼りに焼きなおしてみます。 import random from PIL import Image, ImageDraw vect = [(1, 0), (0, -1), (-1, 0), (0, 1)] def drange(n0, n1): d = cmp(n1, n0) return xrange(n0, n1+d, d) class Maze: def __init__(self): self.wall = self.joint = set() def setwall(self, x, y): if isinstanc
Using python and k-means to find the dominant colors in images October 23, 2012 17:23 / algorithms python / 17 comments I'm working on a little photography website for my Dad and thought it would be neat to extract color information from photographs. I tried a couple of different approaches before finding one that works pretty well. This approach uses k-means clustering to cluster the pixels in gr
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く