-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Robustness improvement in extract_polygonal_environment()
Fixes #606
- Loading branch information
1 parent
d983d48
commit 8003dc0
Showing
1 changed file
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1197,6 +1197,8 @@ def extract_polygons(im: Image.Image, | |
for line in bounds.lines: | ||
if line.boundary is None: | ||
raise KrakenInputException('No boundary given for line') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mittagessen
via email
Author
Owner
|
||
if len(line.baseline) < 2 or geom.LineString(line.baseline).length < 5: | ||
raise KrakenInputException('Baseline length below minimum 5px') | ||
pl = np.array(line.boundary) | ||
baseline = np.array(line.baseline) | ||
c_min, c_max = int(pl[:, 0].min()), int(pl[:, 0].max()) | ||
|
Given those raise not being in Try / except, don't we risk the full polygonization being broken for a single wrong line ? (I am unsure about this statement, I just so the diff which made me react.)