Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Nikolai_T_
Beginner
45 Views

Limitations to the image sizes for CrossCorrNormGetBufferSize

Jump to solution

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

Accepted Solutions
Igor_A_Intel
Employee
45 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

4 Replies
Zhen_Z_Intel
Employee
45 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

 

Nikolai_T_
Beginner
45 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.

Igor_A_Intel
Employee
46 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

Nikolai_T_
Beginner
45 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