Spaces:
Sleeping
Sleeping
Update faceless_processing.py
Browse files- faceless_processing.py +2 -3
faceless_processing.py
CHANGED
|
@@ -434,9 +434,8 @@ def build_interior_edges(rgb: np.ndarray, subject_mask: np.ndarray, cfg: Lineart
|
|
| 434 |
short_side = min(bw, bh) + 1
|
| 435 |
if long_side / short_side < min_aspect:
|
| 436 |
continue
|
| 437 |
-
# Smooth contour —
|
| 438 |
-
|
| 439 |
-
eps = 0.003 * perimeter
|
| 440 |
smooth = cv2.approxPolyDP(cnt, eps, False)
|
| 441 |
cv2.drawContours(filtered, [smooth], -1, 255, cfg.interior_line_thickness)
|
| 442 |
|
|
|
|
| 434 |
short_side = min(bw, bh) + 1
|
| 435 |
if long_side / short_side < min_aspect:
|
| 436 |
continue
|
| 437 |
+
# Smooth contour — 0.005 gives fluid embroidery-friendly curves (reference style)
|
| 438 |
+
eps = 0.005 * perimeter
|
|
|
|
| 439 |
smooth = cv2.approxPolyDP(cnt, eps, False)
|
| 440 |
cv2.drawContours(filtered, [smooth], -1, 255, cfg.interior_line_thickness)
|
| 441 |
|