kaleidoscope
1.4.0
|
#include "kaleidoscope.h"
#include "kaleidoscope-config.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Functions | |
void | getKaleidoscopeVersion (int *major, int *minor, int *patch) |
Get the Kaleidoscope Library version as integer. More... | |
char * | getKaleidoscopeVersionString () |
Get the Kaleidoscope Library version as string. More... | |
char * | getKaleidoscopeLibraryInfo () |
Get the Kaleidoscope Library info as string. More... | |
int | compare (const void *lhsPtr, const void *rhsPtr) |
void | interpolate (TransformationInfo *dataOut, TransformationInfo *dataIn, int width, int height) |
A simple interpolation function. Internal use only. More... | |
void | rotatePoints (TransformationInfo *outData, TransformationInfo *orgData, int width, int height, double angle) |
Rotates the coordinates of sliced triangle. Internal use only. More... | |
int | sliceTriangle (TransformationInfo *transformPtr, int width, int height, int n, double scaleDown) |
Slices a suitable triangle from image. More... | |
int | initKaleidoscope (KaleidoscopeHandle *handler, int n, int width, int height, int nComponents, double scaleDown) |
Initializes kaleidoscope handler. More... | |
void | processKaleidoscope (KaleidoscopeHandle *handler, double k, unsigned char *imgIn, unsigned char *imgOut) |
Applies kaleidoscope effect to image. More... | |
void | deInitKaleidoscope (KaleidoscopeHandle *handler) |
Deinitializes kaleidoscope handler. More... | |
int compare | ( | const void * | lhsPtr, |
const void * | rhsPtr | ||
) |
Definition at line 56 of file kaleidoscope.c.
void deInitKaleidoscope | ( | KaleidoscopeHandle * | handler | ) |
Deinitializes kaleidoscope handler.
[in] | handler | Kaleidoscope effect handler |
Definition at line 304 of file kaleidoscope.c.
char* getKaleidoscopeLibraryInfo | ( | ) |
Get the Kaleidoscope Library info as string.
Definition at line 30 of file kaleidoscope.c.
void getKaleidoscopeVersion | ( | int * | major, |
int * | minor, | ||
int * | patch | ||
) |
Get the Kaleidoscope Library version as integer.
[in,out] | major | Major number |
[in,out] | minor | Minor number |
[in,out] | patch | Patch number |
Definition at line 13 of file kaleidoscope.c.
char* getKaleidoscopeVersionString | ( | ) |
Get the Kaleidoscope Library version as string.
Definition at line 23 of file kaleidoscope.c.
int initKaleidoscope | ( | KaleidoscopeHandle * | handler, |
int | n, | ||
int | width, | ||
int | height, | ||
int | nComponents, | ||
double | scaleDown | ||
) |
Initializes kaleidoscope handler.
[in,out] | handler | Kaleidoscope effect handler |
[in] | n | Number of images for effect |
[in] | width | Image width |
[in] | height | Image height |
[in] | nComponents | Number of image components (eg 3 for RGB) |
[in] | scaleDown | Scale down ratio to shrink image. Must be between 0.0 and 1.0 |
Definition at line 199 of file kaleidoscope.c.
void interpolate | ( | TransformationInfo * | dataOut, |
TransformationInfo * | dataIn, | ||
int | width, | ||
int | height | ||
) |
A simple interpolation function. Internal use only.
[out] | dataOut | Output (interpolated) binary image |
[in] | dataIn | Input binary image |
[in] | width | Width of input image |
[in] | height | Height of input image |
Definition at line 63 of file kaleidoscope.c.
void processKaleidoscope | ( | KaleidoscopeHandle * | handler, |
double | k, | ||
unsigned char * | imgIn, | ||
unsigned char * | imgOut | ||
) |
Applies kaleidoscope effect to image.
[in] | handler | Kaleidoscope effect handler |
[in] | k | Variable to dim background. Should be between 0.0 and 1.0 |
[in] | imgIn | Input image |
[out] | imgOut | Output image |
Definition at line 288 of file kaleidoscope.c.
void rotatePoints | ( | TransformationInfo * | outData, |
TransformationInfo * | orgData, | ||
int | width, | ||
int | height, | ||
double | angle | ||
) |
Rotates the coordinates of sliced triangle. Internal use only.
[out] | outData | Rotated data |
[in] | orgData | Sliced data coordinates |
[in] | width | Width of input image |
[in] | height | Height of input image |
[in] | angle | Top angle of sliced triangle |
Definition at line 128 of file kaleidoscope.c.
int sliceTriangle | ( | TransformationInfo * | transformPtr, |
int | width, | ||
int | height, | ||
int | n, | ||
double | scaleDown | ||
) |
Slices a suitable triangle from image.
[out] | transformPtr | Sliced triangle coordinates |
[in] | width | Width of input image |
[in] | height | Height of input image |
[in] | n | Number of images for effect |
[in] | scaleDown | Scale down ratio to shrink image |
Definition at line 155 of file kaleidoscope.c.