| | |
| | | } |
| | | m_vecCameraImageView.clear(); |
| | | int nSize = (int)m_vecCameraImageView.size(); |
| | | d_MatchingRate = 0.; |
| | | m_bAlignResultUpdate = FALSE; |
| | | |
| | | m_pDAC2P = NULL; |
| | | } |
| | |
| | | strValue = _T("Find Fail"); |
| | | m_ctrlAlignResult.SetGradientColor(RGB(255,0,0)); |
| | | SetImageMode(View_Camera); |
| | | m_bAlignResultUpdate = TRUE; |
| | | break; |
| | | |
| | | case -1: |
| | |
| | | strValue = _T("Success"); |
| | | m_ctrlAlignResult.SetGradientColor(RGB(0,255,0)); |
| | | SetImageMode(View_Camera); |
| | | m_bAlignResultUpdate = TRUE; |
| | | break; |
| | | |
| | | case 2: |
| | |
| | | m_AlignResult.Reset(); |
| | | m_sPreAlignResult.Reset(); |
| | | m_sPostAlignResult.Reset(); |
| | | d_MatchingRate = pGlassResult->m_AlignRecipe.dMatchingRate; |
| | | |
| | | CCoordCalibrator* pCal = m_pDAC2P->DAC2P_GetCoordCalibrator(); |
| | | if (pCal) |
| | |
| | | if (nIDEvent==1000) |
| | | { |
| | | KillTimer(nIDEvent); |
| | | int TempScore0; |
| | | int TempScore1; |
| | | |
| | | int nViewIndex = 2; |
| | | for (VectorCameraImageViewIt it=m_vecCameraImageView.begin(); it!=m_vecCameraImageView.end(); it++) |
| | | { |
| | | if (m_SharedImageData.GetUpdated(nViewIndex)) |
| | | if (m_SharedImageData.GetUpdated(nViewIndex) || m_bAlignResultUpdate == TRUE) |
| | | { |
| | | if (m_bAlignResultUpdate == TRUE) m_bAlignResultUpdate = FALSE; |
| | | if (m_SharedImageData.LockImageData(nViewIndex)) |
| | | { |
| | | const SSharedImageInfo* pImageInfo = m_SharedImageData.GetImageInfo(nViewIndex); |
| | |
| | | (*it)->SetRulerGab(pImageInfo->dRulerGab); // um |
| | | (*it)->SetResolution(pImageInfo->dResolution); // um |
| | | |
| | | switch(pImageInfo->nCameraIndex) |
| | | switch (pImageInfo->nCameraIndex) |
| | | { |
| | | case 0: |
| | | (*it)->SetViewName(_T("1st")); |
| | | (*it)->d_FindScore = m_AlignResult.dFindScore[0]; |
| | | (*it)->d_MatchingRate = d_MatchingRate; |
| | | TempScore0 = m_AlignResult.dFindScore[0] * 100; |
| | | if ((*it)->d_FindScore != 0) |
| | | { |
| | | if ((*it)->d_FindScore > (*it)->d_MatchingRate) |
| | | { |
| | | CString TempStr; |
| | | TempStr.Format(_T("1st OK %d%%"), TempScore0); |
| | | (*it)->SetViewName(TempStr); |
| | | } |
| | | |
| | | else if ((*it)->d_FindScore < (*it)->d_MatchingRate) |
| | | { |
| | | CString TempStr; |
| | | TempStr.Format(_T("1st NG %d%%"), TempScore0); |
| | | (*it)->SetViewName(TempStr); |
| | | } |
| | | |
| | | else |
| | | { |
| | | (*it)->SetViewName(_T("1st")); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | (*it)->SetViewName(_T("1st")); |
| | | } |
| | | break; |
| | | case 1: |
| | | (*it)->SetViewName(_T("2nd")); |
| | | (*it)->d_FindScore = m_AlignResult.dFindScore[1]; |
| | | (*it)->d_MatchingRate = d_MatchingRate; |
| | | TempScore1 = m_AlignResult.dFindScore[1] * 100; |
| | | if ((*it)->d_FindScore != 0) |
| | | { |
| | | if ((*it)->d_FindScore > (*it)->d_MatchingRate) |
| | | { |
| | | CString TempStr; |
| | | TempStr.Format(_T("2nd OK %d%%"), TempScore1); |
| | | (*it)->SetViewName(TempStr); |
| | | } |
| | | |
| | | else if ((*it)->d_FindScore < (*it)->d_MatchingRate) |
| | | { |
| | | CString TempStr; |
| | | TempStr.Format(_T("2nd NG %d%%"), TempScore1); |
| | | (*it)->SetViewName(TempStr); |
| | | } |
| | | else |
| | | { |
| | | (*it)->SetViewName(_T("2nd")); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | (*it)->SetViewName(_T("2nd")); |
| | | } |
| | | break; |
| | | } |
| | | |