Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Kumar__Ubhay
Beginner
77 Views

Error in ippiResizeLinear_8u_C1R : : Illegal value for border type

 

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
77 Views

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

Kumar__Ubhay
Beginner
77 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

Chao_Y_Intel
Employee
77 Views

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

Thanks,
Chao

Reply