I am switching my code from the deprecated ResizeSqrPixel functions to the new Resize API. Is it still possible to use the polynomial cubic interpolation equivalent to IPPI_INTER_CUBIC? How do I set the B and C filter parameters in ippiResizeCubicInit method?
The new cubic resize supports only interpolation with two-parameter cubic filters. This approach provides the interpolation quality that is comparable with IPPI_INTER_CUBIC. The interpolation formulas can be found here http://software.intel.com/en-us/node/443946.
Best regards, Valentin
we just need to have the same result and performance, while using the new API.
So, there are two important questions:
- what are the values for B and C, that would give us the same results?
- can we have the same performance as before?
With best regards,
Hi Hristo, Royi,
I has turned out that I missed the previous question.
There are no such B and C parameters to get the same results as IPPI_INTER_CUBIC interpolation gives. But both interpolations (ippCubic and IPPI_INTER_CUBIC) give the similar quality.
So you can experiment with B and C parameters to get a result that fits better for your task.
in the header file ippi.h , line 12629, you can find the formula and some suggested values of B and C
// 1. The equation shows the family of cubic filters:
// ((12-9B-6C)*|x|^3 + (-18+12B+6C)*|x|^2 + (6-2B) ) / 6 for |x| < 1
// K(x) = (( -B-6C)*|x|^3 + ( 6B+30C)*|x|^2 + (-12B-48C)*|x| + (8B+24C)) / 6 for 1 <= |x| < 2
// 0 elsewhere
// Some values of (B,C) correspond to known cubic splines: Catmull-Rom (B=0,C=0.5), B-Spline (B=1,C=0) and other.
// Mitchell, Don P.; Netravali, Arun N. (Aug. 1988). "Reconstruction filters in computer graphics"
I'm facing similar issue while porting from IPP 6.1 to IPP 9.0.
I'm aware about the difference in interpolation methods used by IPP 6.1 & IPP 9.0 that is IPPI_INTER_CUBIC vs IPPI_INTER_CUBIC2P_CATMULLROM. And as Valentin said- The new cubic resize supports only interpolation with two-parameter cubic filters.
So is there any workaround figured out by anyone to get results similar to IPP6.1?
Does MKL library contain some functionality to get results similar to IPP 6.1 resize() method? Like does MKL's interpolate() method use the same functionality as IPP 6.1 IPPI_INTER_CUBIC?
There is no way to obtain the same result as for IPPI_INTER_CUBIC using two-parameter cubic filters. But both methods give the similar quality.