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

Resizing image with odd dimension

Rolan_R_
Beginner
1,118 Views

Hello,

I have a question about resizing an image with odd dimensions.

According the 7.1 changelog such images resizing is not supported: "ippiResize functions: These functions work with even image resolutions only. Odd resolutions are cropped to an even size and return a warning."

New image resize function such as ippiResize returns a warning on preparation for resizing images with odd dimensions. But old function ippiResizeSqrPixel do not return any warning. Is that means that ippiResizeSqrPixel supports resizing images with odd dimension, or it just silently crops an image.

Also may be somebody can say is IPP 6.1 have same issues or not? And if there are some plans to add support of resizing images with odd dimensions in IPP 7.*?

0 Kudos
8 Replies
Gennady_F_Intel
Moderator
1,118 Views

there are no plans to add support of resizing images with odd dimensions in IPP 7.*?

0 Kudos
SergeyKostrov
Valued Contributor II
1,118 Views
>>...Odd resolutions are cropped to an even size and return a warning." Could you post a full text of the warning or a code number, please?
0 Kudos
Rolan_R_
Beginner
1,118 Views

Sergey Kostrov wrote:

>>...Odd resolutions are cropped to an even size and return a warning."

Could you post a full text of the warning or a code number, please?

ippiResizeGetSize_8u returns: ippStsSizeErr: Incorrect value for data size.

Source size is 940x1, Destination size is 658x1.

0 Kudos
Rolan_R_
Beginner
1,118 Views

Gennady Fedorov (Intel) wrote:

there are no plans to add support of resizing images with odd dimensions in IPP 7.*?

Thank you for reply. Though it would be very handy if library could resize images with odd dimensions.

May be you can tell, does IPP 6.1 have the same limitations?

0 Kudos
SergeyKostrov
Valued Contributor II
1,118 Views
>>>>Could you post a full text of the warning or a code number, please? >> >>ippiResizeGetSize_8u returns: ippStsSizeErr: Incorrect value for data size. >> >>Source size is 940x1, Destination size is 658x1. Thanks.
0 Kudos
fh_i_
Beginner
1,118 Views

image library can't resize images vb.net with odd dimensions, but there are some other way or methods to make images resized. they are quite simple and work in batch too.

0 Kudos
Valentin_K_Intel
Employee
1,118 Views

ippiResize functions correctly work with odd image sizes, but the size of an input image must be greater or equal than a filter size of the chosen interpolation method. So the image with size 940x1 has a small height value that is less than filter height values for Linear, Cubic and Lanczos interpolations.

ippiResizeGetSize functions has the following constraints for the minimal size of an input image depending on the chosen interpolation method: Nearest Neighbor - 1x1, Linear - 2x2, Cubic - 4x4, 2-lobed Lanczos - 4x4.

ippiResize<Interpolation>Init functions has the following constraints for the minimal size of an input image depending on the chosen interpolation method: Nearest Neighbor - 1x1, Linear - 2x2, Cubic - 4x4, 2-lobed Lanczos - 4x4, 3-lobed Lanczos 6x6

SergeyKostrov
Valued Contributor II
1,118 Views
>>...So the image with size 940x1 has a small height value that is less than filter height values for Linear, Cubic and >>Lanczos interpolations... In that case an additional verification before processing needs to be done and in a similar case the function should return some error code.
0 Kudos
Reply