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

IppiRotateCenter

aqlex
Beginner
358 Views
Hello people.
Im from Belarus. Please help me.
How use function " ippiRotateCenter_8u_C3R "? Please send me sample on email (aqlex@mail.ru) or write code in forum.
Thanks.
0 Kudos
2 Replies
Vladimir_Dudnik
Employee
358 Views

Hello,

please take a look at such very simple example

IppiSize srcSize = { 4, 4 }, dstSize = { 6, 6 };

IppiRect srcRect = { 0, 0, 4, 4};

IppiRect dstRect = { 0, 0, 6, 6};

Ipp8u src[4*4] = {

4, 4, 4, 4,

3, 3, 3, 3,

2, 2, 2, 2,

1, 1, 1, 1,

};

Ipp8u dst[6*6];

double angle = -45.0;

double xCenter = 1.0;

double yCenter = 4.0;

ippiSet_8u_C1R ( 0, dst, 6, dstSize);

ippiRotateCenter_8u_C1R (src, srcSize, 4, srcRect, dst, 6, dstRect, angle, xCenter, yCenter, IPPI_INTER_NN);

4 4 4 4

3 3 3 3

2 2 2 2 src

1 1 1 1

0 0 0 0 0 0

0 0 0 4 0 0

0 0 2 3 4 0

0 0 1 2 3 0 dst

0 0 0 1 0 0

0 0 0 0 0 0

Regards,
Vladimir

0 Kudos
yuyh016
Beginner
358 Views
MADvdudnik:

Hello,

please take a look at such very simple example

IppiSize srcSize = { 4, 4 }, dstSize = { 6, 6 };

IppiRect srcRect = { 0, 0, 4, 4};

IppiRect dstRect = { 0, 0, 6, 6};

Ipp8u src[4*4] = {

4, 4, 4, 4,

3, 3, 3, 3,

2, 2, 2, 2,

1, 1, 1, 1,

};

Ipp8u dst[6*6];

double angle = -45.0;

double xCenter = 1.0;

double yCenter = 4.0;

ippiSet_8u_C1R ( 0, dst, 6, dstSize);

ippiRotateCenter_8u_C1R (src, srcSize, 4, srcRect, dst, 6, dstRect, angle, xCenter, yCenter, IPPI_INTER_NN);

4 4 4 4

3 3 3 3

2 2 2 2 src

1 1 1 1

0 0 0 0 0 0

0 0 0 4 0 0

0 0 2 3 4 0

0 0 1 2 3 0 dst

0 0 0 1 0 0

0 0 0 0 0 0

Regards,
Vladimir

I face the same problem as you.

WhenI rotate a image stored in buffer1,whose width and height is not divided by 4 exactly.

I need to new another standard buffer2,whose size is a little larger than buffer1.

After I call this function,

when I delete temportary buffer2,it is alright.

when I delete buffer1,the compiler is brokendown.

The very reason I found is the size of buffer1 changed.

CouldInter experttell me a way to solve this ????

Pls Contact me follow this way : yuyh@neusoft.com

Thanks a lot.

0 Kudos
Reply