Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

ippiResize for 1d "images" - signals

Jonathan_D
Beginner
1,670 Views

Hello forum,

I've used ippiResize in multiple forms to resize both images and 1d signals.  For example:

ippiResizeNearest_32f_C1R, ippiResizeCubic_32f_C1R etc.

In short, these only seem to work with 2d images, and if a 1d image is used, they will throw an error.

So, I I have:

IppiSize srcSize = { 10, 1};
IppiSize dstSize = { 20, 1};

 

The following will return an error in all cases unless ippInterType==1 (NN):

status = ippiResizeGetSize_32f(srcSize, dstSize, ippInterType, antialiasing, &specSize, &bufferSz);

 

Does anyone know if there are any work arounds for this?  Or, is 1d support explicitly removed?

 

For context, this has worked in previous versions (8.1, 9.0), but is not working in 2021.10.

 

Thank you,

 

Jonathan.

0 Kudos
4 Replies
Aleksandra_K
Moderator
1,572 Views

Hi,

Could you provide some simple sample code demonstrating the problem?


Thanks,

Alex


0 Kudos
Jonathan_D
Beginner
1,560 Views

Hi Alex,

Attached is the code as a function.  You'll have to paste into your own environ.  You can choose your interpolation type here:

IppiInterpolationType ippInterType = ippLinear; // Options: ippNearest ippLinear ippCubic ippLanczos ippSuper

All will fail aside from ippNearest 

 

The error message is:

performIpp1dInterpTest(): ERROR -6 returned from ippiResizeGetSize_32f()!

So "Incorrect value for data size"

Any insight would be appreciated.

 

Thanks,

Jonathan.

0 Kudos
Jonathan_D
Beginner
1,386 Views

Hi Alex,

 

Any thoughts on this or is this definitely a bug?

 

Thanks,

 

Jonathan.

0 Kudos
Aleksandra_K
Moderator
1,360 Views

Hi,


This behavior is actually expected. Note that in ResizeGetSize in the list of return values there is ippStsSizeErr, which indicates an error if the source image size is less than the filter size of the chosen interpolation method. The filter size for the nearest neighbor is 1x1, but for other types of filters the sizes are bigger (linear is 2x2, cubic and 2-lobed Lanczos are 4x4). 


Regards,

Aleksandra


0 Kudos
Reply