123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- #pragma once
- #include "CCalib.h"
- #include "dt.h"
- #include "TypeDef.h"
- using namespace std;
- struct CALIB_XY_PARAM {
- double dCenterPosX = 0;
- double dCenterPosY = 0;
- double dGrabPosZ = 0;
- double dCalibStepX = 0;
- double dCalibStepY = 0;
- int nTempId = 0;
- string sResultMatrix = "";
- };
- class __declspec(dllexport) CXYCalib :
- public CCalib
- {
-
- enum XYCalibType { EyeOnHand, EyeOutHand };
- public:
-
- CXYCalib(int id, string name);
-
- ~CXYCalib() {}
-
- virtual int StartCalib() override;
-
- virtual void SetParam() override;
-
- virtual LONG GetParam() override;
-
- void SetPRID(int id) {
- m_stCalibParam_XY.nTempId = id;
- SetParam();
- }
-
- LONG PixelToPos(XY_DOUBLE_STRUCT pixel, XY_DOUBLE_STRUCT& pos);
-
- LONG PosToPixel(XY_DOUBLE_STRUCT pos, XY_DOUBLE_STRUCT& pixel);
-
-
-
- vector<JVision::Point2D> GetNinePixel() { return m_pixels; }
-
- vector<JVision::Point2D> GetNinePosition() { return m_positions; }
- LONG MoveToCalibPos();
- private:
-
- void calNinePoints();
-
-
-
-
-
-
-
-
- private:
-
- const static int PosNum = 9;
- vector<MODULE_CONFIG_STRUCT> m_vecConfigStruct;
-
-
- CALIB_XY_PARAM m_stCalibParam_XY;
-
- vector<JVision::Point2D> m_positions;
-
- vector<JVision::Point2D> m_relativePositions;
-
- vector<JVision::Point2D> m_pixels;
-
- vector<JVision::Point2D> m_relativePixels;
- };
|