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

Usage of ippiResizeCenter()

Mark_R
Beginner
413 Views

I have 2 images representing the same scene (that is rendered with different resolution) andI want to display them one after another (low resolution then high resolution). I use ippiResizeCenter() with an appropriate scaling factor (such that imagewill fill the viewport).

When I pass (width-1)/2.0 and (height-1)/2.0 as xCenter and yCenter (where width and height are the size of each image), I get a small shift between the two images. My question is what xCenter and yCenter should I providein this scenario, i.e. if I want the center of the source image to stay at the center of the destination image?

Thank you.

0 Kudos
5 Replies
Mark_R
Beginner
413 Views
It seems that the origin of the image coordinates is the left topmost corner of the first pixel, and not its center. I haven't found this in the documentation.
0 Kudos
Vladimir_Dudnik
Employee
413 Views

Hi Mark,

that's correct. In IPP image coordinates are starts from top-left corner of image, see IPPI Manual, p2-22, 23 - Regions of Interest in Intel IPP

Vladimir

0 Kudos
Mark_R
Beginner
413 Views

Hi Vladimir,

I also used ippiResizeSqrPixel and compared the results with ippiResizeCenter. After I provide the correct center parameter,ippiResizeCenter causes a small scaling change between the both images, while ippiResizeSqrPixel works perfect.

Another question is what is the difference between the two algorithms? What is the performance difference?

Thanks,

Mark

0 Kudos
Mark_R
Beginner
413 Views

Hi Vladimir,

Yet another question is what the difference between ippiResizeGetBufSize and ippiResizeSqrPixelGetBufSize, and why ippiResizeSqrPixelGetBufSize doesn't support IPPI_INTER_SUPER ?

Thanks,

Mark

0 Kudos
Mark_R
Beginner
413 Views

Nikolay,

Still it is interesting why is theresome scaling change when I use ippiResizeCenter?

Regards,

Mark

0 Kudos
Reply