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, double dimConst)
 Creates kaleidoscope effect.
 
void processImage (uint8_t *inImg, uint8_t *outImg)
 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 31 of file kaleidoscope.hpp.

32 : k(dimConst)
33 {
34 if (initKaleidoscope(&handler, nImage, width, height, nComponents, scaleDown) != 0)
35 {
36 throw std::invalid_argument("Can't init kaleidoscope structure for these inputs");
37 }
38 }
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 61 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 )
inline

Creates kaleidoscope effect. Uses dim constant provided in constructor.

Parameters
inImgInput image
outImgOutput image

Definition at line 56 of file kaleidoscope.hpp.

56{ processImage(inImg, outImg, k); }
void processImage(uint8_t *inImg, uint8_t *outImg, 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,
double dimConst )
inline

Creates kaleidoscope effect.

Parameters
inImgInput image
outImgOutput image
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(const KaleidoscopeHandle *handler, double k, const 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 19 of file kaleidoscope.hpp.

◆ k

double kalos::Kaleidoscope::k
private

Definition at line 18 of file kaleidoscope.hpp.


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