Skip to content

Commit a5136d5

Browse files
authored
Merge pull request #371 from sbrunner/renovate/scikit-image
Fix for already gray image
2 parents 044e2ab + 5974ad0 commit a5136d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deskew/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def main() -> None:
2424
options = parser.parse_args()
2525

2626
image = io.imread(options.input)
27-
grayscale = image if len(image) == 2 else rgb2gray(image)
27+
grayscale = image if len(image.shape) == 2 else rgb2gray(image)
2828
angle = determine_skew(grayscale, sigma=options.sigma, num_peaks=options.num_peaks)
2929
if options.output is None:
3030
print(f"Estimated angle: {angle}")

0 commit comments

Comments
 (0)