CAlignAndCutImage.h 1013 B

123456789101112131415161718192021
  1. #include "CImageBasis.h"
  2. #include "CFindTemplate.h"
  3. class CAlignAndCutImage : public CImageBasis
  4. {
  5. public:
  6. int t0_dx, t0_dy, t1_dx, t1_dy;
  7. CImageBasis *ImageTMP;
  8. CAlignAndCutImage(std::string _image) : CImageBasis(_image) {ImageTMP = NULL;};
  9. CAlignAndCutImage(uint8_t* _rgb_image, int _channels, int _width, int _height, int _bpp) : CImageBasis(_rgb_image, _channels, _width, _height, _bpp) {ImageTMP = NULL;};
  10. CAlignAndCutImage(CImageBasis *_org, CImageBasis *_temp);
  11. bool Align(RefInfo *_temp1, RefInfo *_temp2);
  12. // 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 = "");
  13. void CutAndSave(std::string _template1, int x1, int y1, int dx, int dy);
  14. CImageBasis* CutAndSave(int x1, int y1, int dx, int dy);
  15. void CutAndSave(int x1, int y1, int dx, int dy, CImageBasis *_target);
  16. void GetRefSize(int *ref_dx, int *ref_dy);
  17. };