Skip to content

Commit

Permalink
corrected mask of patch
Browse files Browse the repository at this point in the history
  • Loading branch information
saiprabhath2002 committed Jul 2, 2024
1 parent 491e95a commit fa8fec5
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 fa8fec5

Please sign in to comment.