Computes shift values for rotating an image around the specified center with specified shifts.
IppStatus ippiAddRotateShift(double xCenter, double yCenter, double angle, double* xShift, double* yShift);
xCenter, yCenter |
Coordinates of the required center of rotation. |
angle |
The angle in degrees to rotate the image clockwise around the point with coordinates (xCenter, yCenter). |
xShift, yShift |
Pointers to modified shift values along horizontal and vertical axes. These new shift values should be passed to ippiRotate function to bring about the desired rotation around (xCenter, yCenter) and shifting. |
The function ippiAddRotateShift is declared in the ippi.h file. Use this function if you need to rotate an image about an arbitrary center (xCenter, yCenter) rather than the origin (0,0) with required shifts. The function helps compute shift values xShift, yShift that should be passed to the ippiRotate function to perform the rotation around (xCenter, yCenter) and desired shifting. The shift values should be initialized. For example, to rotate an image around a point (xCenter, yCenter) by the angle with shift values (30.3, 26.2) the following code must be written:
xShift = 30.3 yShift = 26.2 ippiAddRotateShift(xCenter,yCenter,angle,&xShift,&yShift); ippiRotate(angle,xShift,yShift);
Example 12-6 shows how to use the function ippiAddRotateShift.
ippStsNoErr |
Indicates no error. Any other value indicates an error. |
ippStsNullPtrErr |
Indicates an error condition if xShift or yShift pointer is NULL. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.