#pragma once #include #include #include #include #include using namespace zxing; class CGrayImageSource:public LuminanceSource { public: CGrayImageSource(IplImage* gray_img =NULL); ~CGrayImageSource(void); virtual int getWidth() const; virtual int getHeight() const; virtual unsigned char* getRow( int y, unsigned char* row ); virtual ArrayRef getRow( int y, ArrayRef row ) const; virtual unsigned char* getMatrix(); virtual ArrayRef getMatrix() const; IplImage* m_pImg; };