Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -842,7 +842,7 @@ def predict_with_paper(image, paper_size, offset,offset_unit, finger_clearance=F
|
|
842 |
|
843 |
# Apply dilation for offset
|
844 |
if offset_mm > 0:
|
845 |
-
offset_pixels = (float(offset_mm) / scaling_factor # Remove the *2 +1 which was causing excessive dilation
|
846 |
kernel = np.ones((int(offset_pixels), int(offset_pixels)), np.uint8)
|
847 |
dilated_mask = cv2.dilate(rounded_mask, kernel)
|
848 |
else:
|
|
|
842 |
|
843 |
# Apply dilation for offset
|
844 |
if offset_mm > 0:
|
845 |
+
offset_pixels = (float(offset_mm) / scaling_factor) # Remove the *2 +1 which was causing excessive dilation
|
846 |
kernel = np.ones((int(offset_pixels), int(offset_pixels)), np.uint8)
|
847 |
dilated_mask = cv2.dilate(rounded_mask, kernel)
|
848 |
else:
|