Skip to content

Commit bd6fc7c

Browse files
committed
Try with 6 clusters
1 parent 08a2ce0 commit bd6fc7c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

expected/20230121_140756.sgf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(;FF[4]
2+
GM[1]
3+
;AB[cj][cn][dd][df][dg][dp][gd][gg][gh][gi][gj][gr][hc][he][hf][hq][ir][jc][jd][je][jq][ke][ki][kp][kq][mq][oo][ph][pj][pk][pl][qi][ql][qo][ri][rl][rn][rq]
4+
;AW[ej][fc][fd][fe][fg][fh][fi][fl][fo][fq][gf][hg][hp][if][ig][ip][iq][jp][kc][kd][ko][le][lf][nn][no][np][oi][oj][ok][ol][pd][pg][pi][pm][pq][qh][qm]
5+
)

go_capture/sgf/find_stones.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def get_clusters(board):
5858
pixels = np.float32(board.reshape(-1, 3))
5959
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 200, .1)
6060
flags = cv2.KMEANS_RANDOM_CENTERS
61-
_, labels, palette = cv2.kmeans(pixels, 5, None, criteria, 10, flags)
61+
_, labels, palette = cv2.kmeans(pixels, 6, None, criteria, 10, flags)
6262
width, height, _ = board.shape
6363
means = np.mean(palette, axis=1)
6464
return labels.reshape(width, height), np.argmin(means), np.argmax(means)

0 commit comments

Comments
 (0)