Remove commented out code

This commit is contained in:
Andrea Lanfranchi 2024-02-27 10:52:10 +01:00
parent b62d6cc9a0
commit 08710029e8
No known key found for this signature in database
GPG Key ID: 2D623A60BB279915

View File

@ -104,18 +104,6 @@ def detect_faces(
confidence = facial_area.confidence
if expand_percentage > 0:
# Uncomment this if you want to :
# Expand the facial area to be extracted and recompute the height and width
# keeping the same aspect ratio and ensuring that the expanded area stays
# within img.shape limits
# current_area = w * h
# expanded_area = current_area + int((current_area * expand_percentage) / 100)
# scale_factor = math.sqrt(expanded_area / current_area)
# expanded_w = int(w * scale_factor)
# expanded_h = int(h * scale_factor)
# Or uncomment this if you want to :
# Expand the facial region height and width by the provided percentage
# ensuring that the expanded region stays within img.shape limits
expanded_w = w + int(w * expand_percentage / 100)