CAlignAndCutImage.h 1.1 KB

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #ifndef CALIGNANDCUTIMAGE_H
  3. #define CALIGNANDCUTIMAGE_H
  4. #include "CImageBasis.h"
  5. #include "CFindTemplate.h"
  6. class CAlignAndCutImage : public CImageBasis
  7. {
  8. public:
  9. int t0_dx, t0_dy, t1_dx, t1_dy;
  10. CImageBasis *ImageTMP;
  11. CAlignAndCutImage(std::string name, std::string _image) : CImageBasis(name, _image) {ImageTMP = NULL;};
  12. CAlignAndCutImage(std::string name, uint8_t* _rgb_image, int _channels, int _width, int _height, int _bpp) : CImageBasis(name, _rgb_image, _channels, _width, _height, _bpp) {ImageTMP = NULL;};
  13. CAlignAndCutImage(std::string name, CImageBasis *_org, CImageBasis *_temp);
  14. bool Align(RefInfo *_temp1, RefInfo *_temp2);
  15. // void Align(std::string _template1, int x1, int y1, std::string _template2, int x2, int y2, int deltax = 40, int deltay = 40, std::string imageROI = "");
  16. void CutAndSave(std::string _template1, int x1, int y1, int dx, int dy);
  17. CImageBasis* CutAndSave(int x1, int y1, int dx, int dy);
  18. bool CutAndSave(int x1, int y1, int dx, int dy, CImageBasis *_target);
  19. };
  20. #endif //CALIGNANDCUTIMAGE_H