Resizing image with odd dimension

Resizing image with odd dimension

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.*?

9 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

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

>>...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?

Citação:

Sergey Kostrov escreveu:

>>...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.

Citação:

Gennady Fedorov (Intel) escreveu:

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?

>>>>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.

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.

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

>>...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.

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!