tessl install tessl/pypi-imutils@0.5.0A series of convenience functions to make basic image processing functions such as translation, rotation, resizing, skeletonization, displaying Matplotlib images, sorting contours, detecting edges, and much more easier with OpenCV and both Python 2.7 and Python 3.
Agent Success
Agent success rate when using this tile
91%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.34x
Baseline
Agent success rate without this tile
68%
Build a command-line tool that rotates images by specified angles and saves the rotated results.
@generates
The tool should:
The function should handle rotation around the image center by default, and allow custom rotation centers when specified.
def rotate_image(input_path: str, output_path: str, angle: float, center: tuple = None, scale: float = 1.0) -> None:
"""
Rotates an image by the specified angle and saves it.
Args:
input_path: Path to the input image file
output_path: Path to save the rotated image
angle: Rotation angle in degrees (positive = clockwise)
center: Optional (x, y) tuple for rotation center point
scale: Optional scaling factor to apply during rotation
"""
passProvides convenient image processing utilities for OpenCV.