Skip to content

Commit

Permalink
ESL-130 convert angle to float (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
dronperminov authored Sep 13, 2023
1 parent 2f86949 commit 2ba8378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dedocutils/preprocessing/skew_corrector.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def preprocess(self, image: np.ndarray, parameters: Optional[dict] = None) -> Tu
best_angle = angles[scores.index(max(scores))]

rotated = rotate_image(image, best_angle)
return rotated, {"rotated_angle": orientation_angle + best_angle}
return rotated, {"rotated_angle": float(orientation_angle + best_angle)}

def __determine_score(self, arr: np.ndarray, angle: int) -> Tuple[np.ndarray, float]:
data = rotate_image(arr, angle)
Expand Down

0 comments on commit 2ba8378

Please sign in to comment.