A 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.
91
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
Install with Tessl CLI
npx tessl i tessl/pypi-imutilsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10