⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wavelet.h

📁 this is source code for image compression following jpeg2000 staandard
💻 H
字号:
/*---------------------------------------------------------------------------*/
// Image Compression Toolbox v1.2
// written by
// Satish Kumar S
// satishkumr@lycos.com
//
// Copyright 1999 Satish Kumar S
//
// Permission is granted to use this software for research purposes as
// long as this notice stays attached to this software.
/*---------------------------------------------------------------------------*/
#ifndef _WAVELET_H
#define _WAVELET_H

class Filter
{
public:
    double *coeffs;         // filter coefficients.
    int size;               // length of the filter.
    int startIndex;         // the starting index of the coefficients.

    Filter(int size, int startIndex, double *coeffs = NULL);
};

class Wavelet
{
    Filter *anaLow, *anaHigh;       // low and high pass filters for analysis.
    Filter *synLow, *synHigh;       // low and high pass filters for synthesis.

private:
    void PeriodicExtension(double *output, int size, int npad);
    void SymmetricExtension(double *output, int size, int left_ext, int right_ext, 
        int symmetry, int npad);
    void TransformStep(double *data, int datasize, int npad, Filter *lpf, 
        Filter *hpf, double *dest);
    void InverseStep(double *data, int datasize, int npad, Filter *lpf, 
        Filter *hpf, double *dest);

public:
    Wavelet(Filter *anaLow, Filter *synLow = NULL);
    int Transform(Image &image, int nsteps);
    int Inverse(Image &image, int nsteps);
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -