summaryrefslogtreecommitdiff
path: root/src/color_engine.py
diff options
context:
space:
mode:
authorChandler J <cjustice2000@gmail.com>2024-04-06 20:52:13 -0600
committerChandler J <cjustice2000@gmail.com>2024-04-06 20:52:44 -0600
commitb09d6a0a2d9887b5560a3b49cb8a603a33ec4828 (patch)
tree0fbfeab50c95e6732ab69b1e3dae852fd80b0598 /src/color_engine.py
parentb7dc1316ab0eb51f408b2b7782571d868ad3b864 (diff)
improved color picker
Diffstat (limited to 'src/color_engine.py')
-rw-r--r--src/color_engine.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/color_engine.py b/src/color_engine.py
index 0e43475..c24450b 100644
--- a/src/color_engine.py
+++ b/src/color_engine.py
@@ -13,8 +13,6 @@ def grabColors(img_path: str, num_colors: int) -> list:
# scale image down by factor of 10 to decrease computation time
dim = (int(len(img[0])/10), int(len(img)/10))
img = cv.resize(img, dim, interpolation= cv.INTER_AREA)
- # TODO: implement KMeans clustering from scratch to
- # improve program modularity
clt = KMeans(n_clusters=num_colors, n_init='auto')
clt.fit(img.reshape(-1, 3))
return clt.cluster_centers_