Skip to content

Commit 3c49819

Browse files
committed
Don't write clustered image
1 parent 42c158e commit 3c49819

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

go_capture/sgf/find_stones.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,4 @@ def get_clusters(image):
6161
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 200, .1)
6262
flags = cv2.KMEANS_RANDOM_CENTERS
6363
_, labels, palette = cv2.kmeans(pixels, 5, None, criteria, 10, flags)
64-
centers = np.uint8(palette)
65-
labeled_image = centers[labels.flatten()]
66-
clustered_image = labeled_image.reshape(image.shape)
67-
cv2.imwrite('clusters.png', clustered_image)
6864
return labels.reshape(image.shape), np.argmin(palette), np.argmax(palette)

0 commit comments

Comments
 (0)