Python wrapper for Nvidia CUDA parallel computation API with object cleanup, automatic error checking, and convenient abstractions.
A GPU-accelerated image processing module that adjusts brightness of grayscale images.
The module should increase the brightness of a grayscale image by adding a positive value to each pixel, clamping results to the valid range [0, 255].
The module should decrease the brightness of a grayscale image by adding a negative value to each pixel, clamping results to the valid range [0, 255].
The module should handle various image dimensions correctly.
The module should return an unchanged image when the adjustment value is zero.
@generates
import numpy as np
def adjust_brightness(image: np.ndarray, adjustment: int) -> np.ndarray:
"""
Adjusts the brightness of a grayscale image using GPU acceleration.
Args:
image: A 2D NumPy array of uint8 values representing a grayscale image
adjustment: An integer value to add to each pixel (can be positive or negative)
Returns:
A new 2D NumPy array of uint8 values with adjusted brightness,
with all values clamped to the range [0, 255]
"""
passProvides GPU computing capabilities for parallel image processing.
tessl i tessl/pypi-pycuda@2025.1.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10