#ifndef HOLE_DOT_PROCESS #define HOLE_DOT_PROCESS class CHoleDotProcess { public: CHoleDotProcess(); CHoleDotProcess(DimensionDir eDir, int id); ~CHoleDotProcess(); public: //1. »ñÈ¡ID int GetID() { return m_id; } //2. »ñȡͼÏñ HalconCpp::HObject& GetImage() { return m_hImage; } void SetImage(HalconCpp::HObject& image) { m_hImage = image; CreateMatchModel(); } //3. ÉèÖÃλÖà void SetPose(int x, int y) { m_nPoseX = x; m_nPoseY = y; } void GetPose(int& x, int& y) { x = m_nPoseX; y = m_nPoseY; }; //4. ±£´æÊý¾Ý Json::Value WriteToJson(std::string& strDir); void DecodeJson(std::string& strDir, Json::Value& jsValue); //7. Ö´ÐÐ int Execute(DimensionDir eDir, Point2I offset); public: DimensionDir m_eDir; //Side CString m_strName; //Name int m_nUse; //Use int m_nPoseType; //PoseType int m_nShapeType; //ShapeType int m_nBrightType; //BrightType int m_nSmoothSize; //SmoothSize int m_nThres; //Thres int m_nDefectSize; //DefectSize Point2D m_ptLocResult; //¶¨Î»½á¹û std::vector m_nNgInfo; private: HalconCpp::HObject m_hImage; //HoleͼÏñ HalconCpp::HObject m_hImageResult; //½ØÈ¡Í¼Ïñ int m_id; //Hole±àºÅ double m_score; //HoleµÃ·Ö int m_nPoseX; //HoleÖÐÐĵãX int m_nPoseY; //HoleÖÐÐĵãY HalconCpp::HTuple m_idModel; //Ä£°åID double m_xScale; //Ä£°åXËõ·Å double m_yScale; //Ä£°åYËõ·Å bool m_isScale; //ÊÇ·ñËõ·Å private: //1. ´´½¨Ä£°æ int CreateMatchModel(void); //2. ²éÕÒÄ¿±êλÖà bool FindTargetPos(DimensionDir eDir, Point2I offset); //3. »ñȡȱÏÝÐÅÏ¢ bool FindDefectInfo(void); }; #endif // !HOLE_DOT_PROCESS