123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- #pragma once
- #include "CManageDB.h"
- #include "CSingleTemplate.h"
- #ifdef C_PR_STRATEGY_ALN_EXPORTS
- #define C_PR_STRATEGY_ALN_DLL_API __declspec(dllexport)
- #else
- #define C_PR_STRATEGY_ALN_DLL_API
- #endif
- using namespace ns_db;
- using namespace JVision;
- namespace ns_pr
- {
-
- struct FIND_MULTI_TEMP_STRUCT
- {
-
-
- XY_DOUBLE_STRUCT RefPos;
- double score;
- double x;
- double y;
- union
- {
- double angle;
- double radius;
- };
- };
- class C_PR_STRATEGY_ALN_DLL_API CMultiTemplate
- {
- private:
- CAxis* m_pAxisX = nullptr;
- CAxis* m_pAxisY = nullptr;
- CAxis* m_pAxisZ = nullptr;
- CAxis* m_pAxisR = nullptr;
- bool m_bIsInitSuccess = false;
- CProduct* m_pCProduct = nullptr;
- CSingleTemplate* m_pCPrTemplate = nullptr;
- vector<CAMERA_CALIB_STRUCT> m_VecCamera;
-
-
-
- bool CheckCameraId(UINT nCameraId);
-
-
-
- LONG ModuleMove(double dX, double dY, double dZ, double dR);
-
-
-
- CCameraBase* GetCameraPoint(UINT nCameraID);
-
-
-
- CXYCalib* GetXYCalibPoint(UINT nCameraID);
-
-
-
- LONG GetAlnTemplateById(UINT iStrategyId, vector<PR_TEMPLATE>& stTemplate);
-
-
-
- LONG GetAlnRefById(UINT iStrategyId, X_Y_ANGLE_STRUCT& stRef);
-
-
- public:
-
- ~CMultiTemplate();
-
-
- CMultiTemplate(vector<CAMERA_CALIB_STRUCT> vecCamer, CAxis* pX, CAxis* pY, CAxis* pZ = nullptr, CAxis* pR = nullptr);
-
-
- bool IsInitSuccess() { return m_bIsInitSuccess; };
-
-
-
-
-
- LONG SearchMultipleTemplate(vector<PR_TEMPLATE> stVecTemplate, UINT nDelayTakePicture, X_Y_ANGLE_STRUCT& stOutAln);
-
-
-
-
-
-
-
- LONG SearchAlnModels(UINT iStrategyId, UINT nDelayTakePicture, FIND_MULTI_TEMP_STRUCT& stOutAln);
-
-
-
- LONG CreateAlnModels(vector<UINT> vecTemplateId);
- };
- }
|