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

Limitations to the image sizes for CrossCorrNormGetBufferSize

Nikolai_T_
Beginner
528 Views

What are the maximum sizes for the template and src for the CrossCorrNormGetBufferSize ?

I have used this function for a long time with no problems but recently I tried with large images and got an ippStsExceededSizeErr.

Regards
Nikolai

0 Kudos
1 Solution
Igor_A_Intel
Employee
528 Views

Hi,

the size of CrossCorr buffer to a greater extent is defined by the size of template extended to the nearest power of 2, because function implementation is based on the convolution theorem and uses 2D FFT. Additionally we need memory for FFT context and buffer (for transposition) plus buffer for normalization denominator. If integral size of all required buffers exceeds IPP_MAX_32S - the function returns ippStsExceededSizeErr. Fiona misprinted - IPP_MAX_32S = 0x7fffffff.  And Fiona is right - currently we are working on "_L" IPP extension that uses 64-bit size parameters, but to the moment CrossCorr has not been ported to this layer yet (everything will be ported in future versions). "_TL" is threaded extension for "_L" layer. There are many possible workarounds for your issue: to use Resize, Pyramids, some other similarity metrics, etc.

Regards, Igor. 

View solution in original post

0 Kudos
4 Replies
Zhen_Z_Intel
Employee
528 Views

Hi,

If you get this error that indicates you the width/ height of source/destination image exceeded the maximum supported 0x1ffffff. Please note the normal IPP function uses 32bit integer, if you are solving problem with very large size of image, please try to use TL function (threading layer) for 64bit integer. To learn more info about TL function, please refer this link:
https://software.intel.com/en-us/node/684663

https://software.intel.com/en-us/node/684665

 

0 Kudos
Nikolai_T_
Beginner
528 Views

The width and height of both the source and dest are below 0x1ffffff.
But the area width * height is above. So it seems that there is also a
limitation on the image size.

0 Kudos
Igor_A_Intel
Employee
529 Views

Hi,

the size of CrossCorr buffer to a greater extent is defined by the size of template extended to the nearest power of 2, because function implementation is based on the convolution theorem and uses 2D FFT. Additionally we need memory for FFT context and buffer (for transposition) plus buffer for normalization denominator. If integral size of all required buffers exceeds IPP_MAX_32S - the function returns ippStsExceededSizeErr. Fiona misprinted - IPP_MAX_32S = 0x7fffffff.  And Fiona is right - currently we are working on "_L" IPP extension that uses 64-bit size parameters, but to the moment CrossCorr has not been ported to this layer yet (everything will be ported in future versions). "_TL" is threaded extension for "_L" layer. There are many possible workarounds for your issue: to use Resize, Pyramids, some other similarity metrics, etc.

Regards, Igor. 

0 Kudos
Nikolai_T_
Beginner
528 Views

Hi Igor,

Thank you for the clarification. I was thinking of using Resize just needed to know what are the limitations.
I made a simple test calling CrossCorrNormGetBufferSize in various cases. It starts to give errors when the template size is little over FFFFFF.

Regards, Nikolai

0 Kudos
Reply