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