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

ippResize(..) used to zoom into an image. Not good enough though.

elevenmice
Beginner
557 Views
Hi guys,

I have an image. I want to slowly zoom into that image.

I have used ippiResize(...) to slowly enlarge the image while keeping the dstROIsize constant thus giving the impression of zooming into the image. There is one problem though.

When I'm zooming in, the anchor point is at (0,0) which is the top left of the image.

So everytime i zoom in, it feels like a diagonal zoom towards point (0,0).

what I want is to zoom the image towards the center of the image.

Is there a way to do that? tnx.

Below is my ipp code:



status = ippiResize_8u_C4R((Ipp8u*)in,
sizeInput,
inStride * 4,
rectInput,
(Ipp8u*)out,
outStride * 4,
sizeInput,
1.0f / ( m_fBGSize + m_fZoomBG ),
1.0f / ( m_fBGSize + m_fZoomBG ),
IPPI_INTER_CUBIC);

in = input buffer
sizeInput = { width, height } of image
rectInput = { 0, 0, width, height }
out = output buffer
m_fBGSize = 0.8
m_fZoomBG starts at 0 and slowly increases to -0.3


0 Kudos
4 Replies
elevenmice
Beginner
557 Views
Hi again guys,

I'm feeling rather stupid rite now. Smiley with tongue out [:-P]

There is an ippiResize(..) function. And if I had scrolled down one page more, I would have seen that there is another function called ippiResizeCenter, which does exactly what I want.

So my problem is solved. :)
0 Kudos
Vladimir_Dudnik
Employee
557 Views

Good, thanks for updating. How do you find performance of ippiResize function? What is your target OS and HW arch?

Regards,
Vladimir

0 Kudos
elevenmice
Beginner
557 Views
Hi Vladimir,

Our target pcs are intel P3 with winXP.

I personally have a pentium D at 3Ghz and 1G Ram. The performance is excellent. :)


0 Kudos
Vladimir_Dudnik
Employee
557 Views

Thank you, you will be also impressed with performance of our new micro-architecture, Intel Core 2 Duo or Core 2 Quad, that's definetely makes difference.

Vladimir

0 Kudos
Reply