New Features
- NumPy Bridge: Added
from_numpy() and to_numpy() for seamless integration with OpenCV, Pillow, Matplotlib, and the entire Python image processing ecosystem.
Improvements
- Documentation: Expanded IO docs with NumPy integration examples and best practices.
- Testing: Added general test suite (will be expanded in future releases).
- Benchmarks: Added comprehensive performance comparisons against Pillow and OpenCV across multiple operations (blur, resize, rotate, flip, crop, blend).
NumPy Bridge Example
import cv2
from pyimagecuda import from_numpy, to_numpy, blur
# Load with OpenCV
frame = cv2.imread("photo.jpg")
# Process on GPU
img = from_numpy(frame)
blur(img, 10)
# Back to CPU
result = to_numpy(img)
cv2.imwrite("output.jpg", result)