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

Error in ippiResizeLinear_8u_C1R : : Illegal value for border type

Kumar__Ubhay
Beginner
545 Views

 

Hi,

I am using ResizeLinear  to resize an image. 
It is working fine for borderType  ippBorderRepl. But, it throws an error for other borderType like ippBorderConst, ippBorderDefault with  boarderValue 0, 

Given below is error :
    ippiResizeLinear_8u_C1R failed: ippStsBorderErr: Illegal value for border type.

Please suggest cause for this error.

 

 

Regards

Ubhay

0 Kudos
3 Replies
BMart1
New Contributor II
545 Views

Only ippBorderInMem and ippBorderRepl work with ippiResizeLinear, according to the documentation: https://software.intel.com/en-us/ipp-dev-reference-resizelinear

0 Kudos
Kumar__Ubhay
Beginner
545 Views

Hi,

Initially I was using older version of IPP resize API (ippiResize_16u_C1R)  with linear interpolation and I wanted to replace with IPP9.0 resize API. So, I had to replicate Resize function with Linear interpolation and constant border with value 0, so I added margin to src image with border value zero and called ippiResizeLinear_16u_C1R with border type ippBorderInMem. But output of ippiResizeLinear<mod> API is different from that resize API in older version. 

 

Given below is my code:

IppiBorderType borderType = ippBorderInMem; 
Ipp16u boarderValue = 0;
IppiBorderSize borderSize;
ResizeLinearInit_16u(src.getRoiSize(), dst.getRoiSize(), pSpec);
ResizeGetBufferSize_16u(pSpec, dst.getRoiSize(), 1, &workBufSize);
ResizeGetBorderSize_16u(pSpec, &borderSize);
ResizeLinear(srcWithMargin, dst, Point(0, 0), dst.getRoiSize(), borderType, &boarderValue, pSpec, workBuffer);

I need to keep backward compatibility, so please suggest me cause of mismatch and what can be done..?

 

Regards 
Ubhay

0 Kudos
Chao_Y_Intel
Moderator
545 Views

Ubhay,  what's the difference?  Is this +1/-1 value, or do you see some large difference?

Thanks,
Chao

0 Kudos
Reply