CV-CUDA
CV-CUDA copied to clipboard
Fix: Correct Bicubic Boundary Interpolation in CV-CUDA Resize (Tensor Path)
Summary
This PR for the bicubic boundary interpolation fix for CV-CUDA’s Resize operator.
The tensor path now performs per-tap clamping on all 16 cubic samples, matching OpenCV’s behavior at image edges and eliminating the flattening artifacts seen in legacy kernels.
Image Comparison (Original → OpenCV → CvCuda → New CvCuda)
| Dataset | Metric | OpenCV vs Old | OpenCV vs New |
|---|---|---|---|
| real_tabby | Avg abs diff | 0.020 | 0.002 |
| synth | Avg abs diff | 1.696 | 0.116 |
The new implementation reduces mean absolute error (compared to OpenCV) by an order of magnitude compared to the legacy kernel, spesifically at the images edges.
Note: I used OpenCV as colse to ground truth source for comparisons.