CV-CUDA icon indicating copy to clipboard operation
CV-CUDA copied to clipboard

Fix: Correct Bicubic Boundary Interpolation in CV-CUDA Resize (Tensor Path)

Open sezer-muhammed opened this issue 2 months ago • 0 comments

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)

optimized_montage_real_tabby optimized_overlay_hist_real_tabby
optimized_montage_synth optimized_overlay_hist_synth
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.

sezer-muhammed avatar Nov 11 '25 23:11 sezer-muhammed