Skip to content

Commit

Permalink
Added Ramer–Douglas–Peucker algo for contour approximation
Browse files Browse the repository at this point in the history
  • Loading branch information
simoneponcioni committed Feb 7, 2024
1 parent 10777d9 commit aed17ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pyhexspline/spline_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def draw_contours(self, img, loc=str("outer"), approximation: bool = True):
Args:
img (numpy.ndarray): The input image as a 2D numpy array.
loc (str): The location of the contour. Can be "outer" or "inner". Defaults to "outer".
approximation (bool): If True, contour is approximated using the Ramer-Douglas-Peucker (RDP) algorithm. Defaults to True.
Returns:
numpy.ndarray: The contour image as a 2D numpy array.
Expand Down

0 comments on commit aed17ec

Please sign in to comment.