#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. | |
| char * | getKaleidoscopeVersionString () |
| Get the Kaleidoscope Library version as string. | |
| char * | getKaleidoscopeLibraryInfo () |
| Get the Kaleidoscope Library info as string. | |
| static int | compare (const void *lhsPtr, const void *rhsPtr) |
| void | interpolate (TransformationInfo *dataOut, const TransformationInfo *dataIn, int width, int height) |
| A simple interpolation function. Internal use only. | |
| void | rotatePoints (TransformationInfo *outData, const TransformationInfo *orgData, int width, int height, double angle) |
| Rotates the coordinates of sliced triangle. Internal use only. | |
| void | sliceTriangle (TransformationInfo *transformPtr, int width, int height, int n, double scaleDown) |
| Slices a suitable triangle from image. | |
| int | initKaleidoscope (KaleidoscopeHandle *handler, int n, int width, int height, int nComponents, double scaleDown) |
| Initializes kaleidoscope handler. | |
| void | processKaleidoscope (const KaleidoscopeHandle *handler, double k, const unsigned char *imgIn, unsigned char *imgOut) |
| Applies kaleidoscope effect to image. | |
| void | deInitKaleidoscope (KaleidoscopeHandle *handler) |
| Deinitializes kaleidoscope handler. | |
|
static |
Definition at line 55 of file kaleidoscope.c.

| void deInitKaleidoscope | ( | KaleidoscopeHandle * | handler | ) |
Deinitializes kaleidoscope handler.
| [in] | handler | Kaleidoscope effect handler |
Definition at line 319 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. Should be greater than 2 |
| [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 197 of file kaleidoscope.c.


| void interpolate | ( | TransformationInfo * | dataOut, |
| const 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 62 of file kaleidoscope.c.

| void processKaleidoscope | ( | const KaleidoscopeHandle * | handler, |
| double | k, | ||
| const 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 299 of file kaleidoscope.c.

| void rotatePoints | ( | TransformationInfo * | outData, |
| const 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 129 of file kaleidoscope.c.

| void 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.
