Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

ResizeCubicInit

NevineH
Beginner
285 Views

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?

Thanks,

Nevine

0 Kudos
8 Replies
Valentin_K_Intel
Employee
285 Views

Hi Nevine,

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

Hristov__Hristo
New Contributor I
285 Views

Hello, 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,

Hristo

Royi
Novice
285 Views

Hi,

Did you find an answer how to set B and C?

The page linked here is missing.

Thank You.

Valentin_K_Intel
Employee
285 Views

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.

Best regards,
Valentin

Hristov__Hristo
New Contributor I
285 Views

Hi,

in the header file ippi.h , line 12629, you can find the formula and some suggested values of B and C

//  Notes/References:
//    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"
//      http://www.mentallandscape.com/Papers_siggraph88.pdf
Valentin_K_Intel
Employee
285 Views

Thank you, Hristo.

Also the formulas can be found here: https://software.intel.com/en-us/node/505191

Best regards,
Valentin

Komal_S_
Beginner
285 Views

Hi,

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?

Valentin_K_Intel
Employee
285 Views

Hi Komal,

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. 

Best regards,
Valentin

Reply