Enquiry on ResizeSqrPixel API's

Enquiry on ResizeSqrPixel API's


I am using Intel IPP version 6.1 and i was planning to use use the ResizeSqrPixel API instead of Resize API's in our code base. While validating the sample program available here http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi... it looks like the results for NN and LINEAR interpolation are deviating from the results shown in the documentation. Following are the results obtained for NN:

0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000

0.00000000 2.00000000 2.00000000 2.00000000 2.00000000 2.00000000

0.00000000 2.00000000 4.00000000 4.00000000 4.00000000 4.00000000

0.00000000 2.00000000 4.00000000 6.00000000 6.00000000 6.00000000

0.00000000 2.00000000 4.00000000 6.00000000 8.00000000 8.00000000

0.00000000 2.00000000 4.00000000 6.00000000 8.00000000 10.00000000

Following are the results obtained for LINEAR:

0.25000000 0.50000000 0.50000000 0.50000000 0.50000000 0.50000000

0.50000000 2.25000000 2.50000000 2.50000000 2.50000000 2.50000000

0.50000000 2.50000000 4.25000000 4.50000000 4.50000000 4.50000000

0.50000000 2.50000000 4.50000000 6.25000000 6.50000000 6.50000000

0.50000000 2.50000000 4.50000000 6.50000000 8.25000000 8.50000000

0.50000000 2.50000000 4.50000000 6.50000000 8.50000000 10.25000000

But if i am using the deprecated Resize API i'm getting the same results as in the documentation (for NN only). The code used for validating is the same as given in the documentation and the development environment include VS 2008 32 bit compiler, Windows XP sp3 32 bit.We are using Intel Xeon ProcessorE5606@ 2.13 GHz. Could you please let me know if i missed out something during validation.

Varun C.H.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

Hi Varun,

Thank you for the report. We can reproduce the same result as yours. We should update the documentation.

Regarding NN indeprecated ippiResize and later ippiResizeSqr, the implemenation has a little difference.
To define a destination pixel value the Resize algorithm with Nearest Neighbor interpolation uses the value of the source pixel that is nearest to the destination pixel preimage in the source image space. If the destination pixel preimage has the similar distance from several nearest source pixels, the algorithm behavior is undefined and it can use any of these pixels. Now the algorithm uses the right (bottom) source pixel, if there is an indeterminacy, but in earlier IPP versions theleft (top) pixel is was used. The changes are connected with the peculiarities of the algorithm implementation.

Best Regards,

Hi Ying,
Thank you for the quick response. Please let me know when the documentation is updated.

Varun C.H.

Leave a Comment

Please sign in to add a comment. Not a member? Join today