Skip to content

Commit

Permalink
revert e673544 (crashes OpenCV)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Mar 25, 2022
1 parent 200313f commit 5c362e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ocrd_cis/ocropy/ocrolib/morph.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def label(image,**kw):
"""
# default connectivity in OpenCV: 8 (which is equivalent to...)
# default connectivity in scikit-image: 2
n, labels = cv2.connectedComponents(image.astype(uint8), connectivity=4)
# connectivity=4 crashes (segfaults) OpenCV#21366
n, labels = cv2.connectedComponents(image.astype(uint8))
#n, labels = cv2.connectedComponentsWithAlgorithm(image.astype(uint8), connectivity=4, ltype=2, ccltype=cv2.CCL_DEFAULT)
return labels, n-1
# try: return measurements.label(image,**kw)
Expand Down

0 comments on commit 5c362e2

Please sign in to comment.