Spaces:
Build error
Build error
tesalonikahtp commited on
Commit ·
4785d8e
1
Parent(s): ada6310
fix: cast center to float
Browse files
app/util/passport_photo_engine/passport_cropper.py
CHANGED
|
@@ -55,7 +55,7 @@ class PassportCropper:
|
|
| 55 |
|
| 56 |
# 6. Create the Rotation Matrix
|
| 57 |
# We rotate around the calculated center
|
| 58 |
-
M = cv2.getRotationMatrix2D((center_x, center_y), -angle_deg, 1.0)
|
| 59 |
|
| 60 |
# 7. Modify the Matrix for Translation
|
| 61 |
# This is the math magic: We tell OpenCV to move the (center_x, center_y)
|
|
|
|
| 55 |
|
| 56 |
# 6. Create the Rotation Matrix
|
| 57 |
# We rotate around the calculated center
|
| 58 |
+
M = cv2.getRotationMatrix2D((float(center_x), float(center_y)), -angle_deg, 1.0)
|
| 59 |
|
| 60 |
# 7. Modify the Matrix for Translation
|
| 61 |
# This is the math magic: We tell OpenCV to move the (center_x, center_y)
|