Classes | Defines | Enumerations | Functions | Variables

segDTWT.h File Reference

#include "cppTypes.h"
#include "memoryAllocation.h"
#include "imageLoad.h"
#include "tbb/tbb.h"
#include "rangeSegDTWTauto.h"
#include "bodySegDTWT2D.h"
#include "bodySegIDTWT2D.h"

Go to the source code of this file.

Classes

struct  Rect
struct  Size

Defines

#define ALIGN_TO_BYTES   16
#define SUBBAND_COUNT   3
#define SUBSAMPLING   1
#define pow2(x)   ((1)<<(x))
#define r(k, m)   (pow2(k)-(1))*((m)-(1))
#define max(x, y)   x>y?x:y
#define min(x, y)   x<y?x:y
#define odd(x)   (x%2)!=0
#define even(x)   (x%2)==0

Enumerations

enum  wrapType { ZEROS_PADDING = 0, CONST_PADDING = 1, SYMETRIC_HP = 2, SYMETRIC_WP = 3 }
enum  WRESULT { RESULT_OK = 0, RESULT_UNKNOWN_ERROR = -1 }

Functions

WRESULT segDTWTfwd_32f_C1 (float *i_data, int i_widthStep, float *subbands[], int widthSteps[], int levels, Size size, separableWavelet *w)
WRESULT segDTWTinv_32f_C1 (float *subbands[], int widthSteps[], float *o_data, int o_widthStep, int levels, Size size, separableWavelet *w)

Variables

wrapType extensionType
Size segSize
char * waveletFile

Detailed Description

Značení jednotlivých subpásem:

 -------------------------------------- 
 |LL |HL3|      HL2|               HL1| 
 |--------         |                  |
 |LH3|HH3|         |                  |
 |------------------                  |
 |    LH2|      HH2|                  |
 |       |         |                  |
 |       |         |                  |
 |-------------------------------------
 |              LH1|               HH1|
 |                 |                  |
 |                 |                  |
 |                 |                  |
 |                 |                  |
 |                 |                  |
 --------------------------------------
  

Program pracuje s:


Function Documentation

WRESULT segDTWTfwd_32f_C1 ( float *  i_data,
int  i_widthStep,
float *  subbands[],
int  widthSteps[],
int  levels,
Size  size,
separableWavelet w 
)

Function segDTWTfwd_32f_C1 for parallel forward discrete wavelet transform. Works with one channel image (C1) of floats.

Parameters:
[in] i_data - pointer to the beginning of the image
[in] i_widthStep - distance between two consecutive rows of the image in memory in bytes
[in,out] *subbands - array of pointers to the output subbands. The pointers are stored in the following order: subbands[0]=HL1,[1]=HH1,[2]=LH1,[3]=HL2,[4]=HH2,[5]=LH2 .... [last]=LL. The memory need to be allocader beforehand as following:

\[ n_\mathrm{x}(s,m,j) = \mathrm{floor}( 2^{-j}s_\mathrm{x} + (1-2^{-j}(m-1)) \]

and

\[ n_\mathrm{y}(s,m,j) = \mathrm{floor}( 2^{-j}s_\mathrm{y} + (1-2^{-j}(m-1)), \]

, where

  • $ s,s_x,s_y $ dimensions of the input image,
  • $ j $ depth of decomposition,
  • $ m $ the length of filters.
[in,out] widthSteps[] - array of the distances between two consecutive rows in bytes in EACH individual subband
[in] levels - depth of decomnposition
[in] size - dimensions of the input image
[in] w - object defining wavelet filters
Returns:
Error code WRESULT
See also:
segDTWTinv_32f_C1
WRESULT segDTWTinv_32f_C1 ( float *  subbands[],
int  widthSteps[],
float *  o_data,
int  o_widthStep,
int  levels,
Size  size,
separableWavelet w 
)

Function segDTWTinv_32f_C1 for parallel inverse discrete wavelet transform.

Parameters:
[in,out] subbands[] - array of poinert to the individual subbands
[in,out] widthSteps[] -array of the distances between two consecutive rows in bytes in EACH individual subband
[in] o_data -pointer to the output image
[in] o_widthStep -distance between two consecutive rows of the image in memory in bytes
[in] levels -depth of decomposition
[in] size -dimensions of the output image
[in] w -object defining wavelet filtes
Returns:
Chybové hlášení WRESULT
See also:
segDTWTfwd_32f_C1

Variable Documentation

Velikost segmentů, které již nebudou dále děleny 0,0 znamená, že bude přiřazeno 2*r(J)