#pragma once #include enum ModelDataType { ModelData_Intensity=0, ModelData_Edge, ModelData_Count }; enum ModelMethodType { ModelMethod_Full=0, ModelMethod_Level, ModelMethod_Count }; class AFX_EXT_CLASS CRecipeModel { public: CRecipeModel(void); ~CRecipeModel(void); void Reset() { m_nTypeBand = 3; m_nTypeData = ModelData_Intensity; m_nTypeMethod = ModelMethod_Full; m_dScoreThres = 0.8; m_dScoreStop = 0.95; m_nResultCount = 1; m_nLevelFirst = 2; m_nLevelLast = 1; m_nLevelRange = 10; } int m_nTypeBand; int m_nTypeData; int m_nTypeMethod; double m_dScoreThres; double m_dScoreStop; int m_nResultCount; int m_nLevelFirst; int m_nLevelLast; int m_nLevelRange; }; typedef std::vector VectorRecipeModel; typedef std::vector::iterator VectorRecipeModelIt; class AFX_EXT_CLASS CResultModel { public: CResultModel(void); ~CResultModel(void); void Reset() { m_nResultCode = 0; m_dResultScore = 0.0; m_dCenterX = 0.0; m_dCenterY = 0.0; m_nFindLeft = 0; m_nFindTop = 0; m_nFindRight = 0; m_nFindBottom = 0; } int GetWidth() { return m_nFindRight - m_nFindLeft + 1; } int GetHeight() { return m_nFindBottom - m_nFindTop + 1; } int m_nResultCode; double m_dResultScore; double m_dCenterX; double m_dCenterY; int m_nFindLeft; int m_nFindTop; int m_nFindRight; int m_nFindBottom; }; typedef std::vector VectorResultModel; typedef std::vector::iterator VectorResultModelIt;