From 0f482ac8c46deb6f16c7b15ec57674346729ffe6 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 6 Mar 2012 18:40:21 +0100 Subject: [PATCH] use rgb for distance --- pandora/archive/extract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/archive/extract.py b/pandora/archive/extract.py index 19c76372..6d84d21d 100644 --- a/pandora/archive/extract.py +++ b/pandora/archive/extract.py @@ -334,7 +334,7 @@ def average_volume(prefix, start=0, end=0): return 0 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[1] - rgb1[1], 2) + pow(rgb0[2] - rgb1[2], 2)) return dst / math.sqrt(3 * pow(255, 2))