コード例 #1
0
ファイル: MatchingModule.cs プロジェクト: Gz1d/Gz
        /// <summary>
        /// 初始化模板匹配参数
        /// </summary>
        /// <param name="parSet"></param>
        public void InitMatchingParam(MatchingParam parSet)
        {
            m_MatchingParam             = parSet;
            m_MatchingParam.mNumMatches = 1;
            m_MatchingParam.mMaxOverlap = 0.5;
            m_MatchingParam.mSubpixel   = "least_squares";

            if (m_MatchAssistant == null)
            {
                m_MatchAssistant = new MatchingAssistant(m_MatchingParam);
            }
        }
コード例 #2
0
ファイル: MatchingModule.cs プロジェクト: Gz1d/Gz
        public void InitMatchingParam(St_TemplateParam parSet)
        {
            m_MatchingParam.mStartingAngle  = parSet.StartAngle * Math.PI / 180.0;
            m_MatchingParam.mAngleExtent    = (parSet.EndAngle - parSet.StartAngle) * Math.PI / 180.0;
            m_MatchingParam.mNumLevel       = parSet.Level;
            m_MatchingParam.mMinScore       = parSet.Score / 100.0;
            m_MatchingParam.mNumMatches     = 1;
            m_MatchingParam.mMaxOverlap     = 0.5;
            m_MatchingParam.mSubpixel       = "none";//"least_squares";
            m_MatchingParam.mGreediness     = 0.9;
            m_MatchingParam.mMaxError       = parSet.MaxError;
            m_MatchingParam.mImageSizeScale = parSet.Scale;

            if (m_MatchAssistant == null)
            {
                m_MatchAssistant = new MatchingAssistant(m_MatchingParam);
            }
        }