Click here to Skip to main content
Click here to Skip to main content
 

Embedded Zerotree Image Codec with Bior97 SSE Optimized Wavelet-transform

By , 20 Oct 2007
 
ezw_demo.zip
bin
ezwconsole.exe
ezw_demo_update_1_.zip
ezwconsole.exe
ezw_src.zip
src
Lib
Release
ezw_src_update_1_.zip

#ifndef CODECY_H
#define CODECY_H


struct CODECHDR {
        char hdr[16];
        unsigned int size;        //compressed size not including header
        unsigned short width;     //image width
        unsigned short height;    //image height
        unsigned short crc;       //check sum including header
        char res[6];              //reserved padding for 8byte alignement
};

class BaseFWT2D;
class mBior97;
class EZW;


class CodecY
{
public:
        CodecY();
        ~CodecY();

        inline unsigned int width() const;
        inline unsigned int height() const;

        void initgray(unsigned int width, unsigned int height);
        unsigned char* compressgray(const unsigned char* data, unsigned int& size, unsigned int TH = 0);
        int decompressgray(unsigned char* dest, unsigned char* sour);

private:
        int m_status;      //0 - not ready, 1 - OK initilazed
        int m_width;       //original image width
        int m_height;      //original image height

        mBior97 *bior97;   //bior97 class
        EZW *ezw;          //embedded zero-tree class

        unsigned short crc(const unsigned char* addr, unsigned int len) const;         //checksum for a frame        

};


inline unsigned int CodecY::width() const
{
        return m_width;
}

inline unsigned int CodecY::height() const
{
        return m_height;
}


#endif

/*
     initgray(width, height);
     frame = compressgray(image, *size, TH);        //0 - not initialized error
                                                    //0xaddr - OK addres of compressed frame
     res = decompressgray(image, frame);            //0 - not initialized error
                                                    //-1 - not 'YBior97EZW' header
                                                    //-2 - header width,height not equal to initialized bior97
                                                    //-3 - wrong crc of the frame, data corruption?
                                                    //-4 - EZW decompression error
                                                    //W*H - OK decompressed image size

*/

By viewing downloads associated with this article you agree to the Terms of use and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

About the Author

Chesnokov Yuriy
Engineer
Russian Federation Russian Federation
Member
Former Cambridge University postdoc (http://www-ucc-old.ch.cam.ac.uk/research/yc274-research.html), Department of Chemistry, Unilever Centre for Molecular Informatics, where I worked on the problem of complexity analysis of cardiac data.
 
As a subsidiary result we achieved 1st place in the annual PhysioNet/Computers in Cardiology Challenge 2006: QT Interval Measurement (http://physionet.org/challenge/2006/)
 
My research intrests are: digital signal processing in medicine, image and video processing, pattern recognition, AI, computer vision.
 
My recent publications are:
 
Complexity and spectral analysis of the heart rate variability dynamics for distant prediction of paroxysmal atrial fibrillation with artificial intelligence methods. Artificial Intelligence in Medicine. 2008. V43/2. PP. 151-165 (http://dx.doi.org/10.1016/j.artmed.2008.03.009)
 
Face Detection C++ Library with Skin and Motion Analysis. Biometrics AIA 2007 TTS. 22 November 2007, Moscow, Russia. (http://www.dancom.ru/rus/AIA/2007TTS/ProgramAIA2007TTS.html)
 
Screening Patients with Paroxysmal Atrial Fibrillation (PAF) from Non-PAF Heart Rhythm Using HRV Data Analysis. Computers in Cardiology 2007. V. 34. PP. 459–463 (http://www.cinc.org/archives/2007/pdf/0459.pdf)
 
Distant Prediction of Paroxysmal Atrial Fibrillation Using HRV Data Analysis. Computers in Cardiology 2007. V. 34. PP. 455-459 (http://www.cinc.org/archives/2007/pdf/0455.pdf)
 
Individually Adaptable Automatic QT Detector. Computers in Cardiology 2006. V. 33. PP. 337-341 http://www.cinc.org/archives/2006/pdf/0337.pdf)

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 20 Oct 2007
Article Copyright 2007 by Chesnokov Yuriy
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid