Commit 16a25dea authored by André Anjos's avatar André Anjos 💬

Fix cropper for the case there is no padding

parent 5504a64c
Pipeline #5234 passed with stages
in 8 minutes and 20 seconds
......@@ -341,10 +341,17 @@ class FingerCrop (Preprocessor):
numpy.ndarray: A 2D boolean array with the same shape and data type of
the input mask representing the newly aligned mask.
"""
img_h, img_w = image.shape
mask_consider = mask[self.padding_width:-self.padding_width]
if self.padding_width:
mask_consider = mask[self.padding_width:-self.padding_width,
self.padding_width:-self.padding_width]
else:
mask_consider = mask
n_edges = mask_consider.shape[1]
# Calculates the mask edges along the columns
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment