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

ippiResize and ippiResizeCenter usage

axu
Beginner
488 Views
Hi,

I have several questions related to ippiResize and ippiResizeCenter.

ippiResize_8u_C1R(const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation)

ippiResizeCenter_8u_C1R(const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcRoi,

Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,

double xFactor, double yFactor,

double xCenter, double yCenter, int interpolation);

My question is essentially a question on coordinate systems used.
Let's start with ippiResize with roi= (0,0,width, height) and xScaleFactor=yScaleFactor=2. After scaling, the image will be of size (2 * width, 2 * height). My question is: is pixel (0, 0) at the top left corner of the scaled image? Let me rephrase my question: when you specify a roi for a image, which can be srcROI for pSrc and destROI for pDest, it is always specified in the coordinate system attached to the associated image. Am I right?
In other words, if pSrc = srcROI = (0,0,128,128) and xScaleFactor=yScaleFactor=2 and pDestROI = (0,0,128,128), the result will be the top left quarter of the scaled image. Is my understanding right?

Now question for ippiResizeCenter. The Intel doc says:

xCenter, yCenter Coordinates of the point that does not shift after resizing

What does this mean? What coordinate system is used to specify xCenter and yXenter? Why are they double instead of integer? I thought coordinates in an image are always pixel coordinates, which are always integer.

Could somebody please enlighten me? Thanks in advance.
0 Kudos
1 Reply
Ying_S_Intel
Employee
488 Views
To get clarification, you may submit an issue to Intel Premier Support where our support staff will provide assistance for your issue.
Thanks,
Ying S
Intel IPP
0 Kudos
Reply