|
Binary Image Library
|
#include <stdlib.h>#include <math.h>#include <assert.h>Macros | |
| #define | PI 3.1415926535897932384626433832795 |
Functions | |
| int | rotatebyshear (unsigned char *binary, int width, int height, double cx, double cy, double theta, unsigned char *out) |
Rotate by shear.
By Malcolm McLean
Rotate an image using the shearing method, which avoids sampling artifacts as preserves pixel values.
Part of the binary image processing library.
| int rotatebyshear | ( | unsigned char * | binary, |
| int | width, | ||
| int | height, | ||
| double | cx, | ||
| double | cy, | ||
| double | theta, | ||
| unsigned char * | out | ||
| ) |
Rotate an image, using the shearing method.
| [in] | binary | - the binary or colour-indexed image |
| width | - image width | |
| height | - image height | |
| cx | - centre x, y co-ordinates (pass in 1.5, 1.5 for the centre of a 3x3 image) | |
| cy | - centre x, y co-ordinates (pass in 1.5, 1.5 for the centre of a 3x3 image) | |
| theta | - angle to rotate by | |
| out[out] | - buffer for output (can't be the same as input) |
1.8.11