Skip to content

Commit 5c362e2

Browse files
committed
revert e673544 (crashes OpenCV)
1 parent 200313f commit 5c362e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ocrd_cis/ocropy/ocrolib/morph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ def label(image,**kw):
2121
"""
2222
# default connectivity in OpenCV: 8 (which is equivalent to...)
2323
# default connectivity in scikit-image: 2
24-
n, labels = cv2.connectedComponents(image.astype(uint8), connectivity=4)
24+
# connectivity=4 crashes (segfaults) OpenCV#21366
25+
n, labels = cv2.connectedComponents(image.astype(uint8))
2526
#n, labels = cv2.connectedComponentsWithAlgorithm(image.astype(uint8), connectivity=4, ltype=2, ccltype=cv2.CCL_DEFAULT)
2627
return labels, n-1
2728
# try: return measurements.label(image,**kw)

0 commit comments

Comments
 (0)