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 an image enhancement tool that allows users to improve the visual quality of their images by adjusting brightness and contrast levels.
The tool should:
The brightness parameter should support both positive values (to brighten) and negative values (to darken), with 0 meaning no change. The contrast parameter should also support positive and negative values, with 0 meaning no change.
@generates
def enhance_image(input_path: str, output_path: str, brightness: float = 0.0, contrast: float = 0.0) -> None:
"""
Enhances an image by adjusting its brightness and contrast.
Args:
input_path: Path to the input image file
output_path: Path where the enhanced image will be saved
brightness: Brightness adjustment value (0 = no change, positive = brighter, negative = darker)
contrast: Contrast adjustment value (0 = no change, positive = more contrast, negative = less contrast)
"""
passProvides image processing convenience functions for adjusting brightness and contrast.
@satisfied-by