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

📄 image_bw.h

📁 设计并实现了两种分层多描述视频编码器.通过对小波域的运动估计算法进行了分析和研究
💻 H
字号:
// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =//                     I M A G E   C L A S S// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =//           > > > >    C++ version 10.07 -  05/29/95   < < < <// Amir Said - amir@densis.fee.unicamp.br// University of Campinas (UNICAMP)// Campinas, SP 13081, Brazil// William A. Pearlman - pearlman@ecse.rpi.edu// Rensselaer Polytechnic Institute// Troy, NY 12180, USA// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Copyright (c) 1995 Amir Said & William A. Pearlman// This program is Copyright (c) by Amir Said & William A. Pearlman.// It may be freely redistributed in its entirety provided that this// copyright notice is not removed. It may not be sold for profit or// incorporated in commercial programs without the written permission// of the copyright holders. This program is provided as is, without any// express or implied warranty, without even the warranty of fitness// for a particular purpose.// - - External definitions  - - - - - - - - - - - - - - - - - - - - - -#ifdef LOSSLESS typedef int Pel_Type;#define ABS abs#elsetypedef double Pel_Type;#define ABS fabs#endifstruct Image_Coord { int x, y; };// - - Class definition  - - - - - - - - - - - - - - - - - - - - - - - -class Image_BW{  // . private data .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    Image_Coord dim;    long mean;    int levels, bytes;    Pel_Type ** coeff, ** coeff1;  // . private functions  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    int max_levels(int);    void assign_mem(Image_Coord, int);    void free_mem(void);  // . constructor and destructor  .  .  .  .  .  .  .  .  .  .  .  .  .  public :    Image_BW(void) { levels = -1; }    ~Image_BW(void) { free_mem(); }  // . public functions   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    Pel_Type & operator[](const Image_Coord & c) {      return coeff[c.x][c.y]; }    Pel_Type & operator()(int i, int j) {      return coeff[i][j]; }    Pel_Type * address(const Image_Coord & c) {      return coeff[c.x] + c.y; }    Pel_Type * address1(const Image_Coord & c) {
      return coeff1[c.x] + c.y; }
	
	Pel_Type readdress(int i, int j){
		return coeff[i][j];}
    Image_Coord dimension(void) { return dim; }    long transform_mean(void) { return mean; }    int pyramid_levels(void) { return levels; }    int pixel_bytes(void) { return bytes; }    double compare(int, char * file_name);    void read_pic(Image_Coord, char * file_name, int nbytes = 1);

    void send_coeff(Image_Coord, Pel_Type **);

	void send_coeff1(Image_Coord, Pel_Type **);

	void Desend_coeff(Image_Coord , Pel_Type **);

	void Desend_coeff1(Image_Coord , Pel_Type **);

    void P_read_pic(Image_Coord, char * file_name, int nbytes = 1);    void write_pic(char * file_name);    void reset(Image_Coord, long m, int nbytes = 1);

	void lvset(void);

	void lvset(int);    void transform(void);

	void transform(Pel_Type **);    void recover(void);

	void recover(long);

    void recover(long , Pel_Type **);

	void recover(unsigned char **);    void dispose(void) { free_mem(); }

	void decimate(int, int);	void decimate1(int, int);
	void decimate2(int);
	void upsample(int, int);
	void coewrite(void);
	void coecmp(void);
	void coe(double);
	void coeP(double,Pel_Type**);
//	Pel_Type coere(double);
	void recall(int);
	void coeprintf(void);

};  // end definition of class  < Image_BW >// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =// end of file  < Image_BW.H >

⌨️ 快捷键说明

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