kaleidoscope  1.4.0
kaleidoscope.h
Go to the documentation of this file.
1 #ifndef _KALEIDOSCOPE_H_
2 #define _KALEIDOSCOPE_H_
3 
7 struct Point2D_t
8 {
9  int x;
10  int y;
11 };
12 typedef struct Point2D_t Point2D;
13 
18 {
24  unsigned long long srcOffset;
26  unsigned long long dstOffset;
27 };
29 
34 {
36  int width;
38  int height;
40  unsigned char nComponents;
42  long long nPoints;
45 };
47 
54 void getKaleidoscopeVersion(int *major, int *minor, int *patch);
55 
61 
67 
75 void interpolate(TransformationInfo *dataOut, TransformationInfo *dataIn, int width, int height);
76 
85 void rotatePoints(TransformationInfo *outData, TransformationInfo *orgData, int width, int height, double angle);
86 
96 int sliceTriangle(TransformationInfo *transformPtr, int width, int height, int n, double scaleDown);
97 
108 int initKaleidoscope(KaleidoscopeHandle *handler, int n, int width, int height, int nComponents, double scaleDown);
109 
117 void processKaleidoscope(KaleidoscopeHandle *handler, double k, unsigned char *imgIn, unsigned char *imgOut);
118 
124 
125 #endif // _KALEIDOSCOPE_H_
void getKaleidoscopeVersion(int *major, int *minor, int *patch)
Get the Kaleidoscope Library version as integer.
Definition: kaleidoscope.c:13
char * getKaleidoscopeLibraryInfo()
Get the Kaleidoscope Library info as string.
Definition: kaleidoscope.c:30
int initKaleidoscope(KaleidoscopeHandle *handler, int n, int width, int height, int nComponents, double scaleDown)
Initializes kaleidoscope handler.
Definition: kaleidoscope.c:199
char * getKaleidoscopeVersionString()
Get the Kaleidoscope Library version as string.
Definition: kaleidoscope.c:23
void interpolate(TransformationInfo *dataOut, TransformationInfo *dataIn, int width, int height)
A simple interpolation function. Internal use only.
Definition: kaleidoscope.c:63
void rotatePoints(TransformationInfo *outData, TransformationInfo *orgData, int width, int height, double angle)
Rotates the coordinates of sliced triangle. Internal use only.
Definition: kaleidoscope.c:128
void processKaleidoscope(KaleidoscopeHandle *handler, double k, unsigned char *imgIn, unsigned char *imgOut)
Applies kaleidoscope effect to image.
Definition: kaleidoscope.c:288
int sliceTriangle(TransformationInfo *transformPtr, int width, int height, int n, double scaleDown)
Slices a suitable triangle from image.
Definition: kaleidoscope.c:155
void deInitKaleidoscope(KaleidoscopeHandle *handler)
Deinitializes kaleidoscope handler.
Definition: kaleidoscope.c:304
Struct for kaleidoscope effect generator.
Definition: kaleidoscope.h:34
int height
Image height.
Definition: kaleidoscope.h:38
int width
Image width.
Definition: kaleidoscope.h:36
long long nPoints
Total number of points of transfer function.
Definition: kaleidoscope.h:42
struct TransformationInfo_t * pTransferFunc
Transformation info.
Definition: kaleidoscope.h:44
unsigned char nComponents
Number of components (eg 3 for RGB)
Definition: kaleidoscope.h:40
Data struct for pixel locations.
Definition: kaleidoscope.h:8
Data struct for transformation information.
Definition: kaleidoscope.h:18
unsigned long long srcOffset
Offset from source image.
Definition: kaleidoscope.h:24
unsigned long long dstOffset
Offset from destination image.
Definition: kaleidoscope.h:26
Point2D srcLocation
Location from source image.
Definition: kaleidoscope.h:20
Point2D dstLocation
Location to destination image.
Definition: kaleidoscope.h:22