mirror of
https://github.com/283375/arcaea-offline-ocr.git
synced 2025-04-18 21:10:17 +00:00
fix(crop): np.all
instead of all
This commit is contained in:
parent
cb65b68507
commit
2e3d78cd46
@ -17,7 +17,7 @@ def is_black_edge(list_of_pixels: Mat, black_pixel=None):
|
||||
if black_pixel is None:
|
||||
black_pixel = np.array([0, 0, 0], list_of_pixels.dtype)
|
||||
pixels = list_of_pixels.reshape([-1, 3])
|
||||
return np.count_nonzero(all(pixels < black_pixel, axis=1)) > floor(
|
||||
return np.count_nonzero(np.all(pixels < black_pixel, axis=1)) > floor(
|
||||
len(pixels) * 0.6
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user