GrayImageSource.h 614 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <opencv/cv.h>
  3. #include <opencv/cxcore.h>
  4. #include <opencv/highgui.h>
  5. #include <opencv2/opencv.hpp>
  6. #include <zxing/LuminanceSource.h>
  7. using namespace zxing;
  8. class CGrayImageSource:public LuminanceSource
  9. {
  10. public:
  11. CGrayImageSource(IplImage* gray_img =NULL);
  12. ~CGrayImageSource(void);
  13. virtual int getWidth() const;
  14. virtual int getHeight() const;
  15. virtual unsigned char* getRow( int y, unsigned char* row );
  16. virtual ArrayRef<char> getRow( int y, ArrayRef<char> row ) const;
  17. virtual unsigned char* getMatrix();
  18. virtual ArrayRef<char> getMatrix() const;
  19. IplImage* m_pImg;
  20. };