Skip to content

Commit

Permalink
Merge pull request #371 from sbrunner/renovate/scikit-image
Browse files Browse the repository at this point in the history
Fix for already gray image
  • Loading branch information
sbrunner authored Mar 8, 2023
2 parents 044e2ab + 5974ad0 commit a5136d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deskew/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def main() -> None:
options = parser.parse_args()

image = io.imread(options.input)
grayscale = image if len(image) == 2 else rgb2gray(image)
grayscale = image if len(image.shape) == 2 else rgb2gray(image)
angle = determine_skew(grayscale, sigma=options.sigma, num_peaks=options.num_peaks)
if options.output is None:
print(f"Estimated angle: {angle}")
Expand Down

0 comments on commit a5136d5

Please sign in to comment.