image.h

来自「本程序是计算机视觉稠密匹配的程序」· C头文件 代码 · 共 43 行

H
43
字号
/*
 *
 *  All Contents Copyright 2000 by Jared Samet. All Rights Reserved.
 *
 */

#ifndef _IMAGE_H
#define _IMAGE_H

#define new DEBUG_NEW

class CSequence;
class CImage
{
public:    
	static int m_iGapPenalty;
    static int m_iMatchThree;
    static int m_iMatchTwo;
    static int m_iMatchOne;
    static int m_iMatchZero;
	CImage();				    	                                // does nothing
	virtual bool LoadFile(const char *pszFile)=0;                   // create the image from a file. specific to each type
	CSequence* getRow(unsigned int iRow);                           // turn a row into a [new] sequence
    unsigned int cRows(void);                                       // find out how many rows in the picture
    unsigned int cCols(void);
    virtual ~CImage();
    static int GapPenalty(unsigned int left);                       // gap penalty fn for an image
    static int MatchScore(unsigned int left, unsigned int right);   // match the left and right int's
protected:
    struct C3D_RGB
    {
        unsigned char Blue;
        unsigned char Green;
        unsigned char Red;
    };
    static void RGBtoHSL(C3D_RGB rgb, double *H, double *S, double *L);
    unsigned int m_iHeight, m_iWidth;                               // height and width
    static C3D_RGB IntToRGB(unsigned int i);                        // given an int, get its RGB
    static unsigned int RGBToInt(C3D_RGB rgb);                      // given an RGB, make it an int
    C3D_RGB* m_pRGBArray;    
};

#endif

⌨️ 快捷键说明

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