Skip to content

Commit

Permalink
Change dilate to closing
Browse files Browse the repository at this point in the history
  • Loading branch information
joaofauvel authored Jul 1, 2020
1 parent b49b9bf commit efdcd70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def get_contour(self, rescaled_image):

# dilate helps to remove potential holes between edge segments
kernel = cv2.getStructuringElement(cv2.MORPH_RECT,(MORPH,MORPH))
dilated = cv2.dilate(gray, kernel)
dilated = cv2.morphologyEx(gray, cv2.MORPH_CLOSE, kernel)

# find edges and mark them in the output map using the Canny algorithm
edged = cv2.Canny(dilated, 0, CANNY)
Expand Down

0 comments on commit efdcd70

Please sign in to comment.