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

Rotate an image

daniel_larsson
Beginner
601 Views
Hi all,

I an writing a deskew function and want to rotate an image in 2D mode. I have used RotateCenter function with Width/2 as xCenter and Height/2 as yCenter. I use this code:


X1.x=0;
X1.y=0;
X1.width=Width;
X1.height=Height;

X2.x=0;
X2.y=0;
X2.width=Width;
X2.height=Height;

status = ippiRotateCenter_8u_C1R(
(Ipp8u*)pSrc->DataPtr(), pSrc->Size(),
pSrc->Step(), X1, (Ipp8u*)pDst->DataPtr(),
pDst->Step(),
X2, 15, 362, 272, IPPI_INTER_NN);

The result is always in 3D mode and the image seems to has been rotated around x and y axis and part of it is in z axis. I have attached the originasl and result images. The result is 15 dgrees rotated. Can anybody help ?

Regards,

Daniel
0 Kudos
3 Replies
Vladimir_Dudnik
Employee
601 Views

Hi Daniel,

could you please also verify that you can reproduce this behaviour with IPP image-processing sample? You can find ippidemo application in IPPdemo folder, it is able to open BMP file and process image with IPP functions. You will be able to set IPP function parameters in dialogs.

Regards,
Vladimir

0 Kudos
daniel_larsson
Beginner
601 Views
Hi Valdimier,

I did not find Rotate function in Process By menu in ippidemo.exe file. How can I test it ?

Regards,

Daniel
0 Kudos
Vladimir_Dudnik
Employee
601 Views

Daniel, you need to load desired image (or generate one with Jaehne or Ramp alogithm), thenchoose Geometric transform in menu Process->process by .., then Rotate and Shear, then ippiRotateCenter_xx, then function parameters dialog will be available

Vladimir

0 Kudos
Reply