Skip to content

Commit

Permalink
Merge pull request #617 from saiprabhath2002/corrected_mask_of_patch
Browse files Browse the repository at this point in the history
corrected mask of patch (fixes #619)
  • Loading branch information
mittagessen authored Aug 27, 2024
2 parents 6fa8f79 + fa8fec5 commit 412e625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kraken/lib/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def _calc_seam(baseline, polygon, angle, im_feats, bias=150):
mask[line_locs] = 0
dist_bias = distance_transform_cdt(mask)
# absolute mask
mask = np.array(make_polygonal_mask(polygon-(r_min, c_min), patch.shape[::-1])) > 128
mask = np.array(make_polygonal_mask(polygon-(c_min, r_min), patch.shape[::-1])) <= 128
# dilate mask to compensate for aliasing during rotation
mask = binary_erosion(mask, border_value=True, iterations=2)
# combine weights with features
Expand Down

0 comments on commit 412e625

Please sign in to comment.