This commit is contained in:
2505140092
2026-04-16 15:58:38 +08:00
parent bb1edce9c9
commit 4ed4364b14
2 changed files with 33 additions and 0 deletions

11
lx2 Normal file
View File

@@ -0,0 +1,11 @@
import numpy as np
img = np.array([
[255, 255, 0, 0 ],
[255, 255, 0, 0 ],
[0, 0, 255, 255],
[0, 0, 255, 255]
], dtype=np.uint8)
white_count = np.sum(img == 255)
black_count = np.sum(img == 0)