forked from 0x2620/pandora
return average color
This commit is contained in:
parent
32558967e0
commit
5e2ea9551a
1 changed files with 1 additions and 1 deletions
|
@ -262,7 +262,7 @@ def average_color(prefix):
|
||||||
for i in range(0, len(pixels)):
|
for i in range(0, len(pixels)):
|
||||||
p = np.sum(pixels[i], axis=0) / frames
|
p = np.sum(pixels[i], axis=0) / frames
|
||||||
color += p
|
color += p
|
||||||
print list(color)
|
return list(color)
|
||||||
|
|
||||||
def get_distance(rgb0, rgb1):
|
def get_distance(rgb0, rgb1):
|
||||||
dst = math.sqrt(pow(rgb0[0] - rgb1[0], 2) + pow(rgb0[0] - rgb1[0], 2) + pow(rgb0[0] - rgb1[0], 2))
|
dst = math.sqrt(pow(rgb0[0] - rgb1[0], 2) + pow(rgb0[0] - rgb1[0], 2) + pow(rgb0[0] - rgb1[0], 2))
|
||||||
|
|
Loading…
Reference in a new issue