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

Image Geometry Transform - rotation direction

Mike4
Beginner
324 Views
Hi all !
I have a problem using the ippiRotate_xxx methods.
with 8u_C1R and 8u_C3R the direction is clockwise
with 8u_C4R the direction is counterclockwise
I use the IPP 7.01 library.
Is it a normal behavior ?
Thanks
Mike
0 Kudos
4 Replies
Yuri_Tikhomirov__Int
New Contributor I
324 Views
HelloMike,

Could you please provide a sample code with more information about your problem?
What is interpolation method? Whatis image size? Angle?

Thanks,
Beg
0 Kudos
Chao_Y_Intel
Moderator
324 Views

Hi Beg,

You can also run the IPP ippiDemo.exe at Intel\IPP\6.1.6.056\ia32\demo\, and see if this is a code error, or a bug related with IPP.

Regards,
Chao
0 Kudos
Yuri_Tikhomirov__Int
New Contributor I
324 Views
Please take a look at thepictures obtained by using ippiDemo application.
Rotation of (30) and (360-30) degrees.



What is wrong ?

Thanks,
Beg
0 Kudos
Mike4
Beginner
324 Views
Hi all,
may be I made a mistake but I used the same code with ipp 3.0 and I have never had any error.
here is my code :
double dAngle = 45;
double dBounds[2][2];
IppiRect rect = {0, 0, 640, 480};
IppStatus status = ippiGetRotateBound(rect, dBounds, dAngle, 0, 0);
IppiRect rectOutput = {0, 0,dBounds[1][0] - dBounds[0][0],dBounds[1][1] - dBounds[0][1]};
IppiSize sizeInput = {rect.width, rect.height};
status = ippiRotate_8u_C3R(pInputBuffer, sizeInput, iStrideIn, rect,
pOutputBuffer, iStrideOut, rectOutput,
dAngle, -dBounds[0][0], -dBounds[0][1], IPPI_INTER_LINEAR);
status = ippiRotate_8u_C4R(
pInputBuffer, sizeInput, iStrideIn, rect,
pOutputBuffer, iStrideOut, rectOutput,
dAngle,-dBounds[0][0], -dBounds[0][1], IPPI_INTER_LINEAR);
(the pInputBuffer for the 2 above versions are respectively in 24bits and 32bits)
8u_C3R and 8u_C1R rotate in clockwise direction and 8u_C4R in counterclockwise direction
I have the same behavior between 8u_C4R and 8u_AC4R.
Later, if necessary, I will put a test program with full c++ source code. For the moment I haven't the time to do it. To patch the problem I invert the angle in 8 and 24 bits.
I made the tests with ippiDemo, I have the same rotation direction with 24 et 32bits pictures but in clockwise direction (the inverse as noticed in documentation).
Thanks
0 Kudos
Reply