kaleidoscope 1.4.0
 
Loading...
Searching...
No Matches
kalos::Kaleidoscope Class Reference

Kaleidoscope effect generator. More...

#include <kaleidoscope.hpp>

Collaboration diagram for kalos::Kaleidoscope:

Public Member Functions

 Kaleidoscope (int nImage, int width, int height, int nComponents, double scaleDown, double dimConst)
 Construct a new Kaleidoscope object.
 
void processImage (uint8_t *inImg, uint8_t *outImg, size_t size, double dimConst)
 Creates kaleidoscope effect.
 
void processImage (uint8_t *inImg, uint8_t *outImg, size_t size)
 Creates kaleidoscope effect. Uses dim constant provided in constructor.
 
 ~Kaleidoscope ()
 Destroy the Kaleidoscope object.
 

Private Attributes

double k
 
KaleidoscopeHandle handler
 

Detailed Description

Kaleidoscope effect generator.

Definition at line 16 of file kaleidoscope.hpp.

Constructor & Destructor Documentation

◆ Kaleidoscope()

kalos::Kaleidoscope::Kaleidoscope ( int nImage,
int width,
int height,
int nComponents,
double scaleDown,
double dimConst )
inline

Construct a new Kaleidoscope object.

Parameters
[in]nImageNumber of images for effect
[in]widthImage width
[in]heightImage height
[in]nComponentsNumber of color components (eg 3 for RGB)
[in]scaleDownScale down ratio to shrink image. Must be between 0.0 and 1.0
[in]dimConstVariable to dim background. Should be between 0.0 and 1.0

Definition at line 32 of file kaleidoscope.hpp.

33 : k(dimConst)
34 {
35 if (initKaleidoscope(&handler, nImage, width, height, nComponents, scaleDown) != 0)
36 throw std::runtime_error("Can't init kaleidoscope structure for these inputs");
37 }
KaleidoscopeHandle handler
int initKaleidoscope(KaleidoscopeHandle *handler, int n, int width, int height, int nComponents, double scaleDown)
Initializes kaleidoscope handler.
Here is the call graph for this function:

◆ ~Kaleidoscope()

kalos::Kaleidoscope::~Kaleidoscope ( )
inline

Destroy the Kaleidoscope object.

Definition at line 62 of file kaleidoscope.hpp.

void deInitKaleidoscope(KaleidoscopeHandle *handler)
Deinitializes kaleidoscope handler.
Here is the call graph for this function:

Member Function Documentation

◆ processImage() [1/2]

void kalos::Kaleidoscope::processImage ( uint8_t * inImg,
uint8_t * outImg,
size_t size )
inline

Creates kaleidoscope effect. Uses dim constant provided in constructor.

Parameters
inImgInput image
outImgOutput image
sizeSize of the images

Definition at line 57 of file kaleidoscope.hpp.

57{ processImage(inImg, outImg, size, k); }
void processImage(uint8_t *inImg, uint8_t *outImg, size_t size, double dimConst)
Creates kaleidoscope effect.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processImage() [2/2]

void kalos::Kaleidoscope::processImage ( uint8_t * inImg,
uint8_t * outImg,
size_t size,
double dimConst )
inline

Creates kaleidoscope effect.

Parameters
inImgInput image
outImgOutput image
sizeSize of the images
dimConstVariable to dim background. Should be between 0.0 and 1.0

Definition at line 46 of file kaleidoscope.hpp.

47 {
48 processKaleidoscope(&handler, dimConst, inImg, outImg);
49 }
void processKaleidoscope(KaleidoscopeHandle *handler, double k, unsigned char *imgIn, unsigned char *imgOut)
Applies kaleidoscope effect to image.
Here is the call graph for this function:

Member Data Documentation

◆ handler

KaleidoscopeHandle kalos::Kaleidoscope::handler
private

Definition at line 20 of file kaleidoscope.hpp.

◆ k

double kalos::Kaleidoscope::k
private

Definition at line 19 of file kaleidoscope.hpp.


The documentation for this class was generated from the following file: