gerbolyze.py: Fix cv2.findContours to work with cv2 4.0
This commit is contained in:
parent
c14fda6643
commit
e6f8388d3d
1 changed files with 2 additions and 1 deletions
|
|
@ -228,7 +228,8 @@ def plot_contours(
|
|||
|
||||
# Extract contour hierarchy using OpenCV
|
||||
status_print('Extracting contours')
|
||||
img_cont_out, contours, hierarchy = cv2.findContours(img, cv2.RETR_TREE, cv2.CHAIN_APPROX_TC89_KCOS)
|
||||
# See https://stackoverflow.com/questions/48291581/how-to-use-cv2-findcontours-in-different-opencv-versions/48292371
|
||||
contours, hierarchy = findContoursHack(img, cv2.RETR_TREE, cv2.CHAIN_APPROX_TC89_KCOS)[-2:]
|
||||
|
||||
aperture = list(layer.apertures)[0]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue