Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Enquiry on ResizeSqrPixel API's

varunc_hhotmail_com
446 Views

Hi,

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_ch12/functn_ResizeSqrPixel.html 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.

Regards,
Varun C.H.

0 Kudos
1 Solution
Ying_H_Intel
Employee
446 Views
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,
Ying

View solution in original post

0 Kudos
2 Replies
Ying_H_Intel
Employee
447 Views
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,
Ying

0 Kudos
varunc_hhotmail_com
446 Views

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

Regards,
Varun C.H.

0 Kudos
Reply