| | |
| | | #include "CameraControlReview.h" |
| | | #include "CHImageControls/CHImageProcess.h" |
| | | #include "CHMotorControls/MotorControl.h" |
| | | #include "CHSignalControls/SignalControl.h" |
| | | |
| | | #include "CHEdgeTriangle/EdgeTriangle.h" |
| | | #include "CHEdgeTriangle/RecipeManager.h" |
| | |
| | | int nEndResultIdx = pReviewResult->GetEndSReviewResultIndex(); |
| | | |
| | | |
| | | // �ε����� ���� ������ �ε��� ���� Ŭ��.. |
| | | if (nCurResultIdx > nEndResultIdx) |
| | | { |
| | | LeaveCriticalSection(&m_csUserCriticalSection); |
| | |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]SetWsiResultData module[%d] point[%d] result[%d]"), nModuleIndex, measureResut.nResultIndex, nCurResultIdx); |
| | | } |
| | | |
| | | |
| | | // 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 |
| | | |
| | | wsiResult.nWsi_ResultIndex = measureResut.nResultIndex; |
| | | wsiResult.nResultCode = measureResut.nResultCode; |
| | |
| | | // g_pLog->DisplayMessage(_T("[ReviewProcessor]JugementR [%d] JugementG [%d] JugementB [%d]"), wsiResult.nJugementR, wsiResult.nJugementG, wsiResult.nJugementB); |
| | | // g_pLog->DisplayMessage(_T("[ReviewProcessor]RZoneHeight [%.03lf] GZoneHeight [%.03lf] BZoneHeight [%.03lf]"), wsiResult.dRZoneHeight, wsiResult.dGZoneHeight, wsiResult.dBZoneHeight); |
| | | |
| | | // wsiResult.�߰� �ϼ���= measureResut.nMultiShot; |
| | | // wsiResult.�߰� �ϼ���= measureResut.nCurrentShotNumber; |
| | | break; |
| | | case 3: //BANK |
| | | wsiResult.dRZoneHeight = measureResut.dRZoneHeight; |
| | |
| | | wsiResult.dBZoneHeight = measureResut.dBZoneHeight; |
| | | wsiResult.dDefectHeight = measureResut.dDefectHeight; |
| | | wsiResult.nWsi_DefectType = measureResut.nDefectType; |
| | | // wsiResult.�߰� �ϼ���= measureResut.nMultiShot; |
| | | // wsiResult.�߰� �ϼ���= measureResut.nCurrentShotNumber; |
| | | |
| | | break; |
| | | case 4: //CS |
| | | wsiResult.dCSHeight = measureResut.dCSHeight; |
| | | wsiResult.dDefectHeight = measureResut.dDefectHeight; |
| | | wsiResult.nWsi_DefectType = measureResut.nDefectType; |
| | | // wsiResult.�߰� �ϼ���= measureResut.nMultiShot; |
| | | |
| | | break; |
| | | } |
| | | |
| | |
| | | |
| | | memcpy(wsiResult.pWsi_ResultData, measureResut.pResultData, sizeof(wsiResult.pWsi_ResultData)); |
| | | |
| | | |
| | | // 占쏙옙占?占쏙옙占쏙옙占쏙옙 占쌩곤옙 |
| | | SReviewResult *pProcessResult = NULL; |
| | | if (pGlassResult->SetWsiResultData(nModuleIndex, nCurResultIdx, wsiResult, nGlassPosX, nGlassPosY, nMotorPosX, nMotorPosY, dTime)) |
| | | { |
| | |
| | | pProcessResult = pReviewResult->GetSReviewResult(nCurResultIdx); |
| | | } |
| | | |
| | | // ���� ������, ���� ������� ������ ���� |
| | | if (pProcessResult) |
| | | { |
| | | // ó�� ������ ���� |
| | | if (AddReviewProcessData(pProcessResult)==1) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]Add Process Data module[%d] result[%d]"), nModuleIndex, nCurResultIdx); |
| | |
| | | |
| | | LeaveCriticalSection(&m_csUserCriticalSection); |
| | | |
| | | // 占쏙옙占?占쏙옙占쏙옙. |
| | | m_pRP2P->IRP2P_UpdateReviewResult(nModuleIndex, pGlassResult); |
| | | return; |
| | | |
| | |
| | | int nEndResultIdx = pReviewResult->GetEndSReviewResultIndex(); |
| | | |
| | | |
| | | // �ε����� ���� ������ �ε��� ���� Ŭ��.. |
| | | if (nCurResultIdx > nEndResultIdx) |
| | | { |
| | | LeaveCriticalSection(&m_csUserCriticalSection); |
| | |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]SetWsiResultData module[%d] point[%d] result[%d]"), nModuleIndex, measureResut.nResultIndex, nCurResultIdx); |
| | | } |
| | | |
| | | // 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 |
| | | wsiUserResult.nWsi_ResultCode = measureResut.nResultCode; |
| | | wsiUserResult.nWsi_Type = measureResut.nResultType; |
| | | wsiUserResult.nWsi_SlopeWarn = measureResut.nXSlopeWarn; |
| | | memcpy(wsiUserResult.pWsi_ResultData, measureResut.pResultData, sizeof(wsiUserResult.pWsi_ResultData)); |
| | | |
| | | |
| | | // 占쏙옙占?占쏙옙占쏙옙占쏙옙 占쌩곤옙 |
| | | SReviewResult *pProcessResult = NULL; |
| | | if (pGlassResult->SetUserWsiResultData(nModuleIndex, nCurResultIdx, wsiUserResult, nGlassPosX, nGlassPosY, nMotorPosX, nMotorPosY, dTime)) |
| | | { |
| | |
| | | pProcessResult = pReviewResult->GetSReviewResult(nCurResultIdx); |
| | | } |
| | | |
| | | // ���� ������, ���� ������� ������ ���� |
| | | if (pProcessResult) |
| | | { |
| | | // ó�� ������ ���� |
| | | if (AddReviewProcessData(pProcessResult)==1) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]Add Process Data module[%d] result[%d]"), nModuleIndex, nCurResultIdx); |
| | |
| | | |
| | | LeaveCriticalSection(&m_csUserCriticalSection); |
| | | |
| | | // 占쏙옙占?占쏙옙占쏙옙. |
| | | m_pRP2P->IRP2P_UpdateReviewResult(nModuleIndex, pGlassResult); |
| | | return; |
| | | |
| | |
| | | int nEndResultIdx = pReviewResult->GetEndSReviewResultIndex(); |
| | | |
| | | |
| | | // �ε����� ���� ������ �ε��� ���� Ŭ��.. |
| | | if (nCurResultIdx > nEndResultIdx) |
| | | { |
| | | LeaveCriticalSection(&m_csUserCriticalSection); |
| | |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]SetWsiMultiShotResultData module[%d] point[%d] result[%d]"), nModuleIndex, measureResut.nResultIndex, nCurResultIdx); |
| | | } |
| | | |
| | | // 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 |
| | | wsiResult.nWsi_ResultCode = measureResut.nResultCode; |
| | | wsiResult.nWsi_Type = measureResut.nResultType; |
| | | wsiResult.nWsi_SlopeWarn = measureResut.nXSlopeWarn; |
| | |
| | | memcpy(wsiResult.pWsi_ResultData, measureResut.pResultData, sizeof(wsiResult.pWsi_ResultData)); |
| | | |
| | | |
| | | // 占쏙옙占?占쏙옙占쏙옙占쏙옙 占쌩곤옙 |
| | | SReviewResult *pProcessResult = NULL; |
| | | if (pGlassResult->SetWsiResultData(nModuleIndex, nCurResultIdx, wsiResult, nGlassPosX, nGlassPosY, nMotorPosX, nMotorPosY, dTime)) |
| | | { |
| | |
| | | pProcessResult = pReviewResult->GetSReviewResult(nCurResultIdx); |
| | | } |
| | | |
| | | // ���� ������, ���� ������� ������ ���� |
| | | if (pProcessResult) |
| | | { |
| | | // ó�� ������ ���� |
| | | if (AddReviewProcessData(pProcessResult) == 1) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]Add Process Data module[%d] result[%d]"), nModuleIndex, nCurResultIdx); |
| | |
| | | } |
| | | |
| | | LeaveCriticalSection(&m_csUserCriticalSection); |
| | | |
| | | // 占쏙옙占?占쏙옙占쏙옙. |
| | | m_pRP2P->IRP2P_UpdateReviewResult(nModuleIndex, pGlassResult); |
| | | return; |
| | | |
| | |
| | | int nStartResultIdx = pReviewResult->GetStartSReviewResultIndex(); |
| | | int nEndResultIdx = pReviewResult->GetEndSReviewResultIndex(); |
| | | |
| | | // �ε����� ���� ������ �ε��� ���� Ŭ��.. |
| | | if (nCurResultIdx > nEndResultIdx) |
| | | { |
| | | LeaveCriticalSection(&m_csUserCriticalSection); |
| | |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]SetReviewResultData module[%d] point[%d] result[%d]"), nModuleIndex, nResultIndex, nCurResultIdx); |
| | | } |
| | | |
| | | // 占쏙옙占쏙옙 占쏙옙占쏙옙譴占쏙옙占?占쏙옙占쏙옙 |
| | | SReviewResult *pProcessResult = NULL; |
| | | switch(GetReviewProcessStatus()) |
| | | { |
| | |
| | | break; |
| | | } |
| | | |
| | | // ���� ������, ���� ������� ������ ���� |
| | | if (pProcessResult) |
| | | { |
| | | // ó�� ������ ���� |
| | | if (AddReviewProcessData(pProcessResult)==1) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]Add Process Data module[%d] result[%d]"), nModuleIndex, nCurResultIdx); |
| | |
| | | pReviewResult->SetLastSReviewResultIndex(nCurResultIdx); |
| | | } |
| | | LeaveCriticalSection(&m_csUserCriticalSection); |
| | | |
| | | //占쏙옙占쏙옙 占쏙옙占?占쏙옙占쏙옙占쏙옙占쏙옙占쏙옙트 占쏙옙占쏙옙占쏙옙 占쏙옙占쌔뱄옙占쏙옙占쏙옙 占싣뤄옙 占쏙옙占쏙옙占쏙옙 占쏙옙타占쏙옙 占쌕쏙옙 占쏙옙占쏙옙占쏙옙표 占싫쏙옙占쏙옙 |
| | | // ��ȣó�� �ʿ��� �̰� ���� |
| | | |
| | | if (nCurResultIdx + 1== pReviewResult->GetSReviewResultCount()) |
| | | { |
| | | if (nModuleIndex == 0) |
| | |
| | | |
| | | if (bLeftGantryReviewDone&&bRightGantryReviewDone) |
| | | { |
| | | ::Sleep(3000); // 占쏙옙占쏙옙甄占?占십쇽옙占쏙옙. 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙. |
| | | ::Sleep(3000); |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]RemainReview Started module[%d]"), nModuleIndex); |
| | | CSequenceProcessor* pSequenceProcessor = m_pRP2P->IRP2P_GetSequenceProcessor(); |
| | | switch (GetReviewProcessStatus()) |
| | |
| | | } |
| | | else if(m_pRP2P->IRP2P_Recipe_GetRsRcpReviewInfo()->GetRcpSchedulingInfo()->GetSingleGantryPath()>0) |
| | | { |
| | | //20210302 占싱깍옙 占쏙옙트占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙 占싸곤옙占쏙옙 占쏙옙트占쏙옙占쏙옙 占싹뤄옙占?占쏙옙占승울옙占쏙옙 |
| | | //占쏙옙占쏙옙占쏙옙 占쌔야듸옙占쏙옙占쏙옙 Review 占쏙옙占쏙옙 Count 체크 占싹댐옙 占쏙옙占쏙옙占쏙옙占?占싼곤옙트占쏙옙 占쏙옙占쏙옙 200占쏙옙占쏙옙占쏙옙 占쏙옙占쌩댐옙 占쏙옙占쏙옙 占쌩삼옙 |
| | | //占쌓뤄옙占쏙옙 占싱깍옙 占쏙옙트占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙처占쏙옙 占싹울옙 占쏙옙占쏙옙占싹듸옙占쏙옙 占쌕뀐옙森占?CHM |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]Single GantryPath Use"), nModuleIndex); |
| | | if (bLeftGantryReviewDone || bRightGantryReviewDone) |
| | | { |
| | | ::Sleep(3000); // 占쏙옙占쏙옙甄占?占십쇽옙占쏙옙. 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙. |
| | | ::Sleep(3000); |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]RemainReview Started module[%d]"), nModuleIndex); |
| | | CSequenceProcessor* pSequenceProcessor = m_pRP2P->IRP2P_GetSequenceProcessor(); |
| | | switch (GetReviewProcessStatus()) |
| | |
| | | |
| | | } |
| | | |
| | | // 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙트占쏙옙占쏙옙 占쌉곤옙, 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙占?占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙... |
| | | if(nCurResultIdx==nEndResultIdx && nCurResultIdx+1 < pReviewResult->GetSReviewResultCount()) |
| | | { |
| | | |
| | |
| | | pReviewResult->SetStartSReviewResultIndex(nStartResultIdx); |
| | | pReviewResult->SetEndSReviewResultIndex(nEndResultIdx); |
| | | |
| | | // ������ ����Ʈ ���� ��������. |
| | | ::Sleep(3000); // 占쏙옙占쏙옙甄占?占십쇽옙占쏙옙. 占쏙옙占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙. |
| | | ::Sleep(3000); |
| | | if (bLeftGantryReviewDone&&bRightGantryReviewDone) |
| | | { |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // 占쏙옙占?占쏙옙占쏙옙. |
| | | m_pRP2P->IRP2P_UpdateReviewResult(nModuleIndex, pGlassResult, m_nReviewPlanIndex); |
| | | return; |
| | | |
| | |
| | | { |
| | | if (m_pRP2P==NULL) return 0; |
| | | |
| | | // ������ ����Ʈ���� Ȯ�� �� PCControl ReviewEnd ���� |
| | | CGlassResult *pGlassResult = m_pRP2P->IRP2P_GetCurrentGlassResult(); |
| | | CSequenceProcessor* pSequenceProcessor = m_pRP2P->IRP2P_GetSequenceProcessor(); |
| | | if (pGlassResult==NULL || pSequenceProcessor==NULL) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | // ����Ȯ�� |
| | | if (pGlassResult->CheckReviewComplete()) |
| | | { |
| | | // check motor ready! |
| | |
| | | { |
| | | if (m_pRP2P==NULL) return 0; |
| | | |
| | | // ������ ����Ʈ���� Ȯ�� �� PCControl ReviewEnd ���� |
| | | CGlassResult *pGlassResult = m_pRP2P->IRP2P_GetCurrentGlassResult(); |
| | | CSequenceProcessor* pSequenceProcessor = m_pRP2P->IRP2P_GetSequenceProcessor(); |
| | | if (pGlassResult==NULL || pSequenceProcessor==NULL) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | // ����Ȯ�� |
| | | if (pGlassResult->CheckUserComplete()) |
| | | { |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("User Last Point Complete! ")); |
| | |
| | | { |
| | | if (m_pRP2P==NULL) return 0; |
| | | |
| | | // ������ ����Ʈ���� Ȯ�� �� PLC ReviewEnd ���� |
| | | CGlassResult *pGlassResult = m_pRP2P->IRP2P_GetCurrentGlassResult(); |
| | | CSequenceProcessor* pSequenceProcessor = m_pRP2P->IRP2P_GetSequenceProcessor(); |
| | | if (pGlassResult==NULL || pSequenceProcessor==NULL) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | // ����Ȯ�� |
| | | if (pGlassResult->CheckReflowComplete()) |
| | | { |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("Reflow Last Point Complete! ")); |
| | |
| | | { |
| | | if (m_pRP2P==NULL) return 0; |
| | | |
| | | // ������ ����Ʈ���� Ȯ�� �� PCControl ReviewEnd ���� |
| | | CGlassResult *pGlassResult = m_pRP2P->IRP2P_GetCurrentGlassResult(); |
| | | CSequenceProcessor* pSequenceProcessor = m_pRP2P->IRP2P_GetSequenceProcessor(); |
| | | if (pGlassResult==NULL || pSequenceProcessor==NULL) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | // ����Ȯ�� |
| | | if (pGlassResult->CheckWsiComplete()) |
| | | { |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("Wsi Last Point Complete! ")); |
| | |
| | | g_pLog->DisplayMessage(_T("PostProcessMeasureResult[%d]"),nThreadIdx); |
| | | if (m_pRP2P==NULL) return 0; |
| | | |
| | | // ������ ����Ʈ���� Ȯ�� �� PCControl ReviewEnd ���� |
| | | CGlassResult *pGlassResult = m_pRP2P->IRP2P_GetCurrentGlassResult(); |
| | | CSequenceProcessor* pSequenceProcessor = m_pRP2P->IRP2P_GetSequenceProcessor(); |
| | | if (pGlassResult==NULL || pSequenceProcessor==NULL) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | // ����Ȯ�� |
| | | if (pGlassResult->CheckMeasureComplete()) |
| | | { |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("Measure Last Point Complete! ")); |
| | |
| | | { |
| | | if (m_pRP2P==NULL) return 0; |
| | | |
| | | // ������ ����Ʈ���� Ȯ�� �� PCControl ReviewEnd ���� |
| | | CGlassResult *pGlassResult = m_pRP2P->IRP2P_GetCurrentGlassResult(); |
| | | CSequenceProcessor* pSequenceProcessor = m_pRP2P->IRP2P_GetSequenceProcessor(); |
| | | if (pGlassResult==NULL || pSequenceProcessor==NULL) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | // ����Ȯ�� |
| | | if (pGlassResult->CheckWsiReflowComplete()) |
| | | { |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("Wsi Reflow Last Point Complete! ")); |
| | |
| | | { |
| | | if (m_pRP2P==NULL) return 0; |
| | | |
| | | // ������ ����Ʈ���� Ȯ�� �� PCControl ReviewEnd ���� |
| | | CGlassResult *pGlassResult = m_pRP2P->IRP2P_GetCurrentGlassResult(); |
| | | CSequenceProcessor* pSequenceProcessor = m_pRP2P->IRP2P_GetSequenceProcessor(); |
| | | if (pGlassResult==NULL || pSequenceProcessor==NULL) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | // ����Ȯ�� |
| | | if (pGlassResult->CheckWsiUserComplete()) |
| | | { |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("Wsi Last Point Complete! ")); |
| | |
| | | { |
| | | if (m_pRP2P == NULL) return 0; |
| | | |
| | | // ������ ����Ʈ���� Ȯ�� �� PCControl ReviewEnd ���� |
| | | CGlassResult *pGlassResult = m_pRP2P->IRP2P_GetCurrentGlassResult(); |
| | | CSequenceProcessor* pSequenceProcessor = m_pRP2P->IRP2P_GetSequenceProcessor(); |
| | | if (pGlassResult == NULL || pSequenceProcessor == NULL) |
| | |
| | | return 1; |
| | | } |
| | | |
| | | // ����Ȯ�� |
| | | if (pGlassResult->CheckWsiMultiShotComplete()) |
| | | { |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("WsiMultiShot Last Point Complete! ")); |
| | |
| | | return ReviewResult_Process_Fail; |
| | | } |
| | | |
| | | // Snap �ð� ����. |
| | | CTime snapTime = CTime::GetCurrentTime(); |
| | | pReviewResult->strSnapTime.Format(_T("%04d%02d%02d%02d%02d%02d"), snapTime.GetYear(), snapTime.GetMonth(), snapTime.GetDay(), |
| | | snapTime.GetHour(), snapTime.GetMinute(), snapTime.GetSecond()); // snap_time |
| | | |
| | | // 占쏙옙占쏙옙 占쏙옙占싸듸옙 占싱뱄옙占쏙옙 占쏙옙占쏙옙 占싱몌옙 占쏙옙占쏙옙占? |
| | | CString strImageFileName = _T(""); |
| | | if (MakeReviewImageFileName(pReviewResult)==FALSE) |
| | | { |
| | | |
| | | } |
| | | |
| | | //占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 占쌨몌옙 占쏙옙占쏙옙 占싱뱄옙占쏙옙 占싱몌옙 占쏙옙 占쏙옙표 채占쏙옙占쌍깍옙 |
| | | if(!UpdateMemoryReviewPlan(pReviewResult)) |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("[ReviewPlan] Memory Update Fail!! DefectIdx : %d"), pReviewResult->nDefectidx2); |
| | | |
| | | // ���� �̹��� ���� ���� �̸� |
| | | pReviewResult->strImgFileName = m_strSaveImageBasePath + _T("\\") +pReviewResult->strImgFileName; |
| | | pReviewResult->nOpticType = 1; |
| | | |
| | |
| | | // UINT64 nSize = SaveReviewImage(&uploadImage, strPath, m_nReviewImageSize, m_nReviewImageQuality, m_nReviewImageStep); |
| | | //if (nSize > 0) |
| | | // m_pRP2P->IRP2P_DisplayMessage(_T("Backup Review Image Save Success! Size: %d byte [%s]"), nSize, pReviewResult->strUploadImgFileName); |
| | | // 占쏙옙占싸듸옙 占싱뱄옙占쏙옙 占쏙옙占?占쏙옙占쏙옙 20190917 chm |
| | | strPath.Format(_T("%s\\%s"), m_strSaveImageUploadPath, pReviewResult->strUploadImgFileName); |
| | | nSize = SaveReviewImage(&uploadImage, strPath, m_nReviewImageSize, m_nReviewImageQuality, m_nReviewImageStep); |
| | | |
| | |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("RTMS Review Image Save Fail!!")); |
| | | } |
| | | |
| | | else m_pRP2P->IRP2P_DisplayMessage(_T("RTMS Review Image Save Success! Size: %d byte [%s] index[%d]"), nSize, strRTMSPath, pReviewResult->nDefectIdx); //taek 210128 �ӵ� ������ �ӽ÷� �α� ������ ���� |
| | | else m_pRP2P->IRP2P_DisplayMessage(_T("RTMS Review Image Save Success! Size: %d byte [%s] index[%d]"), nSize, strRTMSPath, pReviewResult->nDefectIdx); |
| | | |
| | | } |
| | | if (nSize > 0) |
| | |
| | | const CRsRcpReviewInfo* psRcpReviewInfo = m_pRP2P->IRP2P_Recipe_GetRsRcpReviewInfo(); |
| | | if(psRcpReviewInfo== NULL) m_pRP2P->IRP2P_DisplayMessage(_T("RcpReviewInfo is NULL")); |
| | | |
| | | if(psRcpReviewInfo->m_bDefocusUse) //190819chm 占쏙옙占쏙옙커占쏙옙 占싯띰옙 占쏙옙占? |
| | | if(psRcpReviewInfo->m_bDefocusUse) |
| | | { |
| | | if(pReviewResult->nLocation == DefectLoc_ASG || pReviewResult->nLocation == DefectLoc_PAD || pReviewResult->nLocation == DefectLoc_C2C) |
| | | { |
| | |
| | | |
| | | if (pReviewResult->nModuleIdx == 0 && m_pRP2P->IRP2P_GetFirstReviewLeft()) |
| | | { |
| | | const CSignalControlInfo* pSignalInfo = m_pRP2P->IRP2P_GetReviewSignalinfo(); |
| | | int nDefocusValueMin = pSignalInfo->GetDefocusValueMin(); |
| | | int nDefocusValueMax = pSignalInfo->GetDefocusValueMax(); |
| | | |
| | | m_pRP2P->IRP2P_GetCurrentGlassResult()->nReview00ImageContrast = dFocusValue; |
| | | m_pRP2P->IRP2P_SetFirstReviewLeft(FALSE); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("FirstReviewLeft FDC FocusValue = %.2f "), dFocusValue); |
| | | |
| | | if (dFocusValue < nDefocusValueMin || dFocusValue > nDefocusValueMax) |
| | | { |
| | | m_pRP2P->IRP2P_GetSequenceProcessor()->SendSignalToSignalControl(0, 3, 1000); |
| | | } |
| | | } |
| | | else if(pReviewResult->nModuleIdx == 1 && m_pRP2P->IRP2P_GetFirstReviewRight()) |
| | | { |
| | | const CSignalControlInfo* pSignalInfo = m_pRP2P->IRP2P_GetReviewSignalinfo(); |
| | | int nDefocusValueMin = pSignalInfo->GetDefocusValueMin(); |
| | | int nDefocusValueMax = pSignalInfo->GetDefocusValueMax(); |
| | | |
| | | m_pRP2P->IRP2P_GetCurrentGlassResult()->nReview01ImageContrast = dFocusValue; |
| | | m_pRP2P->IRP2P_SetFirstReviewRight(FALSE); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("FirstReviewRight FDC FocusValue = %.2f "), dFocusValue); |
| | | |
| | | if (dFocusValue < nDefocusValueMin || dFocusValue > nDefocusValueMax) |
| | | { |
| | | m_pRP2P->IRP2P_GetSequenceProcessor()->SendSignalToSignalControl(0, 3, 1000); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //#3524_210723_LYW_CF AOI Review 디포커스 알람 추가 및 FDC 보고 방식 개선 MOD Start |
| | | else |
| | | { |
| | | double dFocusValue = 0.; |
| | |
| | | |
| | | if (pReviewResult->nModuleIdx == 0 && m_pRP2P->IRP2P_GetFirstReviewLeft()) |
| | | { |
| | | const CSignalControlInfo* pSignalInfo = m_pRP2P->IRP2P_GetReviewSignalinfo(); |
| | | int nDefocusValueMin = pSignalInfo->GetDefocusValueMin(); |
| | | int nDefocusValueMax = pSignalInfo->GetDefocusValueMax(); |
| | | |
| | | m_pRP2P->IRP2P_GetCurrentGlassResult()->nReview00ImageContrast = dFocusValue; |
| | | m_pRP2P->IRP2P_SetFirstReviewLeft(FALSE); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("FirstReviewLeft FDC FocusValue = %.2f "), dFocusValue); |
| | | |
| | | if (dFocusValue < nDefocusValueMin || dFocusValue > nDefocusValueMax) |
| | | { |
| | | m_pRP2P->IRP2P_GetSequenceProcessor()->SendSignalToSignalControl(0, 3, 1000); |
| | | } |
| | | |
| | | } |
| | | else if (pReviewResult->nModuleIdx == 1 && m_pRP2P->IRP2P_GetFirstReviewRight()) |
| | | { |
| | | const CSignalControlInfo* pSignalInfo = m_pRP2P->IRP2P_GetReviewSignalinfo(); |
| | | int nDefocusValueMin = pSignalInfo->GetDefocusValueMin(); |
| | | int nDefocusValueMax = pSignalInfo->GetDefocusValueMax(); |
| | | |
| | | m_pRP2P->IRP2P_GetCurrentGlassResult()->nReview01ImageContrast = dFocusValue; |
| | | m_pRP2P->IRP2P_SetFirstReviewRight(FALSE); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("FirstReviewRight FDC FocusValue = %.2f "), dFocusValue); |
| | | |
| | | if (dFocusValue < nDefocusValueMin || dFocusValue > nDefocusValueMax) |
| | | { |
| | | m_pRP2P->IRP2P_GetSequenceProcessor()->SendSignalToSignalControl(0, 3, 1000); |
| | | } |
| | | |
| | | } |
| | | } |
| | | //#3524_210723_LYW_CF AOI Review 디포커스 알람 추가 및 FDC 보고 방식 개선 MOD End |
| | | |
| | | |
| | | |
| | |
| | | return ReviewResult_Process_Fail; |
| | | } |
| | | |
| | | // Snap �ð� ����. |
| | | CTime snapTime = CTime::GetCurrentTime(); |
| | | pReviewResult->strSnapTime.Format(_T("%04d%02d%02d%02d%02d%02d"), snapTime.GetYear(), snapTime.GetMonth(), snapTime.GetDay(), |
| | | snapTime.GetHour(), snapTime.GetMinute(), snapTime.GetSecond()); // snap_time |
| | | |
| | | // 占쏙옙占쏙옙 占쏙옙占싸듸옙 占싱뱄옙占쏙옙 占쏙옙占쏙옙 占싱몌옙 占쏙옙占쏙옙占? |
| | | CString strImageFileName = _T(""); |
| | | if (MakeUserImageFileName(pReviewResult)==FALSE) |
| | | { |
| | |
| | | if(!UpdateMemoryUserPlan(pReviewResult)) |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("[UserPlan] Memory Update Fail!! DefectIdx : %d"), pReviewResult->nDefectidx2); |
| | | |
| | | |
| | | //// ���� �̹��� ���� ���� �̸� |
| | | //strImageFileName.Format(_T("ModuleIdx[%d]_PointIdx[%d]_Zoom[%d]"), pReviewResult->nModuleIdx, pReviewResult->nResultIdx, pReviewResult->nZoomIdx); |
| | | //pReviewResult->strImgFileName = strImageFileName; |
| | | |
| | |
| | | UINT64 nSize = SaveReviewImage(&uploadImage, strPath, m_nReviewImageSize, m_nReviewImageQuality, m_nReviewImageStep); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("Upload Review Image Save Success! Size: %d byte"), nSize); |
| | | |
| | | //uploadImage.SaveImage(strPath, 40); // ȭ�� 60% 150k |
| | | //uploadImage.SaveImage(strPath, 40); |
| | | if(GetReviewProcessStatus() == ReviewProcessStatus_UserStart) |
| | | { |
| | | // 占쏙옙占싸듸옙 占싱뱄옙占쏙옙 占쏙옙占?占쏙옙占쏙옙 20190917 chm |
| | | //strPath.Format(_T("%s\\%s\\%s"), m_strSaveImageUploadPath, m_strGlassID, pReviewResult->strUploadImgFileName); |
| | | strPath.Format(_T("%s\\%s"), m_strSaveImageUploadPath, pReviewResult->strUploadImgFileName); |
| | | nSize = SaveReviewImage(&uploadImage, strPath, m_nReviewImageSize, m_nReviewImageQuality, m_nReviewImageStep); |
| | |
| | | const CRsRcpReviewInfo* psRcpReviewInfo = m_pRP2P->IRP2P_Recipe_GetRsRcpReviewInfo(); |
| | | if(psRcpReviewInfo== NULL) m_pRP2P->IRP2P_DisplayMessage(_T("RcpReviewInfo is NULL")); |
| | | |
| | | if(psRcpReviewInfo->m_bDefocusUse) //190819chm 占쏙옙占쏙옙커占쏙옙 占싯띰옙 占쏙옙占? |
| | | if(psRcpReviewInfo->m_bDefocusUse) |
| | | { |
| | | if(pReviewResult->nLocation == DefectLoc_ASG || pReviewResult->nLocation == DefectLoc_PAD || pReviewResult->nLocation == DefectLoc_C2C) |
| | | { |
| | |
| | | |
| | | if (pReviewResult->nModuleIdx == 0 && m_pRP2P->IRP2P_GetFirstReviewLeft()) |
| | | { |
| | | const CSignalControlInfo* pSignalInfo = m_pRP2P->IRP2P_GetReviewSignalinfo(); |
| | | int nDefocusValueMin = pSignalInfo->GetDefocusValueMin(); |
| | | int nDefocusValueMax = pSignalInfo->GetDefocusValueMax(); |
| | | |
| | | m_pRP2P->IRP2P_GetCurrentGlassResult()->nReview00ImageContrast = dFocusValue; |
| | | m_pRP2P->IRP2P_SetFirstReviewLeft(FALSE); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("FirstReviewLeft FDC FocusValue = %.2f "), dFocusValue); |
| | | |
| | | if (dFocusValue < nDefocusValueMin || dFocusValue > nDefocusValueMax) |
| | | { |
| | | m_pRP2P->IRP2P_GetSequenceProcessor()->SendSignalToSignalControl(0, 3, 1000); |
| | | } |
| | | } |
| | | else if (pReviewResult->nModuleIdx == 1 && m_pRP2P->IRP2P_GetFirstReviewRight()) |
| | | { |
| | | const CSignalControlInfo* pSignalInfo = m_pRP2P->IRP2P_GetReviewSignalinfo(); |
| | | int nDefocusValueMin = pSignalInfo->GetDefocusValueMin(); |
| | | int nDefocusValueMax = pSignalInfo->GetDefocusValueMax(); |
| | | |
| | | m_pRP2P->IRP2P_GetCurrentGlassResult()->nReview01ImageContrast = dFocusValue; |
| | | m_pRP2P->IRP2P_SetFirstReviewRight(FALSE); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("FirstReviewRight FDC FocusValue = %.2f "), dFocusValue); |
| | | |
| | | if (dFocusValue < nDefocusValueMin || dFocusValue > nDefocusValueMax) |
| | | { |
| | | m_pRP2P->IRP2P_GetSequenceProcessor()->SendSignalToSignalControl(0, 3, 1000); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | //#3524_210723_LYW_CF AOI Review 디포커스 알람 추가 및 FDC 보고 방식 개선 ADD Start |
| | | else |
| | | { |
| | | double dFocusValue = 0.; |
| | | CCHImageData imageConvert; |
| | | if (pImageData->GetChannels() != 1) |
| | | { |
| | | CCHImageProcess::ImageConvert(pImageData, &imageConvert, ConvertTypeRGB2Gray); |
| | | } |
| | | else |
| | | { |
| | | pImageData->CopyImageTo(&imageConvert); |
| | | } |
| | | if (imageConvert.GetImageExist()) |
| | | { |
| | | dFocusValue = CalcFocusValue(imageConvert.GetImageBuffer(), imageConvert.GetWidth(), imageConvert.GetHeight()); |
| | | } |
| | | |
| | | if (pReviewResult->nModuleIdx == 0 && m_pRP2P->IRP2P_GetFirstReviewLeft()) |
| | | { |
| | | const CSignalControlInfo* pSignalInfo = m_pRP2P->IRP2P_GetReviewSignalinfo(); |
| | | int nDefocusValueMin = pSignalInfo->GetDefocusValueMin(); |
| | | int nDefocusValueMax = pSignalInfo->GetDefocusValueMax(); |
| | | |
| | | m_pRP2P->IRP2P_GetCurrentGlassResult()->nReview00ImageContrast = dFocusValue; |
| | | m_pRP2P->IRP2P_SetFirstReviewLeft(FALSE); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("FirstReviewLeft FDC FocusValue = %.2f "), dFocusValue); |
| | | |
| | | if (dFocusValue < nDefocusValueMin || dFocusValue > nDefocusValueMax) |
| | | { |
| | | m_pRP2P->IRP2P_GetSequenceProcessor()->SendSignalToSignalControl(0, 3, 1000); |
| | | } |
| | | } |
| | | else if (pReviewResult->nModuleIdx == 1 && m_pRP2P->IRP2P_GetFirstReviewRight()) |
| | | { |
| | | const CSignalControlInfo* pSignalInfo = m_pRP2P->IRP2P_GetReviewSignalinfo(); |
| | | int nDefocusValueMin = pSignalInfo->GetDefocusValueMin(); |
| | | int nDefocusValueMax = pSignalInfo->GetDefocusValueMax(); |
| | | |
| | | m_pRP2P->IRP2P_GetCurrentGlassResult()->nReview01ImageContrast = dFocusValue; |
| | | m_pRP2P->IRP2P_SetFirstReviewRight(FALSE); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("FirstReviewRight FDC FocusValue = %.2f "), dFocusValue); |
| | | |
| | | if (dFocusValue < nDefocusValueMin || dFocusValue > nDefocusValueMax) |
| | | { |
| | | m_pRP2P->IRP2P_GetSequenceProcessor()->SendSignalToSignalControl(0, 3, 1000); |
| | | } |
| | | |
| | | } |
| | | } |
| | | //#3524_210723_LYW_CF AOI Review 디포커스 알람 추가 및 FDC 보고 방식 개선 ADD End |
| | | |
| | | return ReviewResult_Process_Complete; |
| | | } |
| | |
| | | |
| | | int nTestMode = FALSE; |
| | | |
| | | //�ù� �������� �̹��� ���� ���� 20190827 chm |
| | | if(nTestMode){ |
| | | Sleep(500); |
| | | CString strPathName; |
| | |
| | | return ReviewResult_Process_Fail; |
| | | } |
| | | |
| | | // Snap �ð� ����. |
| | | CTime snapTime = CTime::GetCurrentTime(); |
| | | pReviewResult->strSnapTime.Format(_T("%04d%02d%02d%02d%02d%02d"), snapTime.GetYear(), snapTime.GetMonth(), snapTime.GetDay(), |
| | | snapTime.GetHour(), snapTime.GetMinute(), snapTime.GetSecond()); // snap_time |
| | | |
| | | // 占쏙옙占쏙옙 占쏙옙占싸듸옙 占싱뱄옙占쏙옙 占쏙옙占쏙옙 占싱몌옙 占쏙옙占쏙옙占? |
| | | CString strImageFileName = _T(""); |
| | | if (MakeReflowImageFileName(pReviewResult)==FALSE) |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | reflowParam reParam; //Reflow ���� ���� |
| | | reflowResult reResult;//Reflow 占쏙옙占?占쏙옙占쏙옙 |
| | | reflowParam reParam; |
| | | reflowResult reResult; |
| | | |
| | | ////////////////////////////////////////////////////////////////////////////////////////////// |
| | | BOOL btFlag =0; |
| | |
| | | CCHImageData tempImage; |
| | | tempImageOrigin.CopyImageFrom(pImageData); |
| | | |
| | | if(pReviewResult->nReflow_Side==7) // ���� ���� |
| | | if(pReviewResult->nReflow_Side==7) |
| | | { |
| | | btFlag=1; |
| | | CCHImageProcess::ImageRotate(pImageData,&tempImage,135);//���� �̹����� Right ȸ�� ���� Right ���� ���� |
| | | CCHImageProcess::ImageRotate(pImageData,&tempImage,135); |
| | | pImageData = &tempImage; |
| | | //reParam.nImageWidth = 2048; |
| | | //reParam.nImageHeight = 2432; |
| | |
| | | |
| | | CCHImageData tmepData2; |
| | | if(btFlag==1){ |
| | | CCHImageProcess::ImageRotate(pImageData,&tmepData2,135);//Right ������ �ٽ� �̹��� ������ |
| | | CCHImageProcess::ImageRotate(pImageData,&tmepData2,135); |
| | | pImageData= &tmepData2; |
| | | //pImageData->SaveImage(_T("D:\\Testafter.bmp"));//Test �� ���� bmp ���� |
| | | //pImageData->SaveImage(_T("D:\\Testafter.bmp")); |
| | | } |
| | | |
| | | |
| | |
| | | UINT64 nSize = SaveReviewImage(&uploadImage, strPath, m_nReviewImageSize, m_nReviewImageQuality, m_nReviewImageStep); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("Upload Review Image Save Success! Size: %d byte"), nSize); |
| | | |
| | | //uploadImage.SaveImage(strPath, 40); // ȭ�� 60% 150k |
| | | //uploadImage.SaveImage(strPath, 40); |
| | | if(GetReviewProcessStatus() == ReviewProcessStatus_ReflowStart) |
| | | { |
| | | // 占쏙옙占싸듸옙 占싱뱄옙占쏙옙 占쏙옙占?占쏙옙占쏙옙 20190917 chm |
| | | //strPath.Format(_T("%s\\%s\\%s"), m_strSaveImageUploadPath, m_strGlassID, pReviewResult->strUploadImgFileName); |
| | | strPath.Format(_T("%s\\%s"), m_strSaveImageUploadPath, pReviewResult->strUploadImgFileName); |
| | | nSize = SaveReviewImage(&uploadImage, strPath, m_nReviewImageSize, m_nReviewImageQuality, m_nReviewImageStep); |
| | | |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("Upload Reflow Image Save Success! Size: %d byte"), nSize); |
| | | |
| | | //�ùĵ����� �̹��� �ڵ����� ������ 20190927chm |
| | | if(nTestMode) |
| | | { |
| | | CString csParam; |
| | |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("Upload Reflow Image Save Fail![%s]"), pReviewResult->strUploadImgFileName); |
| | | } |
| | | |
| | | //������ ������Ʈ |
| | | if(!UpdateMemoryReflowPlan(pReviewResult)) |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("[ReflowPlan] Memory Update Fail!! DefectIdx : %d"), pReviewResult->nDefectidx2); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | //���ϸ� 181227 cmark |
| | | BOOL CReviewProcessor_CPJT::MakeReviewImageFileName(SReviewResult* pReviewResult) |
| | | { |
| | | if (m_pRP2P==NULL || pReviewResult==NULL) return FALSE; |
| | |
| | | |
| | | if(GetReviewProcessStatus() == ReviewProcessStatus_ReviewStart) |
| | | { |
| | | // [2017:6:5]-[WEZASW] : Review Image 占쏙옙占싹몌옙占?'*' 占쏙옙占?占쏙옙占쏙옙.(占쏙옙占쏙옙처占쏙옙) |
| | | // [2017:6:5]-[WEZASW] : Review Image |
| | | if (pReviewResult->strDefectCode.Compare(_T("***")) == 0) |
| | | strDefectCodeTemp = _T("DC"); |
| | | else |
| | |
| | | snapTime.GetHour(), snapTime.GetMinute(), snapTime.GetSecond()); // snap_time |
| | | |
| | | |
| | | // [2017:4:10]-[WEZASW] : 占쏙옙占쏙옙占?占쏙옙청占쏙옙 占쏙옙占쏙옙 bmp 占쏙옙占쏙옙 占쌩곤옙 占쏙옙占쏙옙. (占쌈시삼옙占? |
| | | // [2017:4:10]-[WEZASW] : |
| | | pReviewResult->strOrignalImgFileName = strFileName + _T(".bmp"); |
| | | |
| | | strFileName += _T(".jpg"); |
| | |
| | | |
| | | int CReviewProcessor_CPJT::ProcessWSIReflow(int nThreadIdx, SReviewResult* pReviewResult) |
| | | { |
| | | // [2016:11:15]-[WEZASW] : ���� �ʿ� |
| | | // [2016:11:15]-[WEZASW] : |
| | | if(!UpdateMemoryWsiReflowPlan(pReviewResult)) |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("[WsiReflowPlan] Memory Update Fail!! DefectIdx : %d"), pReviewResult->nDefectidx2); |
| | | |
| | | // wsi�� return ������ ���� [6/20/2017 bhs] |
| | | return WsiResultSuccess; |
| | | } |
| | | |
| | |
| | | |
| | | if(GetReviewProcessStatus() == ReviewProcessStatus_UserStart) |
| | | { |
| | | // [2017:6:5]-[WEZASW] : Review Image 占쏙옙占싹몌옙占?'*' 占쏙옙占?占쏙옙占쏙옙.(占쏙옙占쏙옙처占쏙옙) |
| | | // [2017:6:5]-[WEZASW] : Review Image |
| | | if (pReviewResult->strDefectCode.Compare(_T("***")) == 0) |
| | | strDefectCodeTemp = _T("DC"); |
| | | else |
| | |
| | | // strFileName += pReviewResult->strSnapTime; |
| | | // } |
| | | |
| | | // [2017:4:10]-[WEZASW] : 占쏙옙占쏙옙占?占쏙옙청占쏙옙 占쏙옙占쏙옙 bmp 占쏙옙占쏙옙 占쌩곤옙 占쏙옙占쏙옙. (占쌈시삼옙占? |
| | | // [2017:4:10]-[WEZASW] : |
| | | pReviewResult->strOrignalImgFileName = strFileName + _T(".bmp"); |
| | | |
| | | strFileName += _T(".jpg"); |
| | |
| | | |
| | | void CReviewProcessor_CPJT::LoadAoiImage(const CString& strGlassID, int nOpticType, int nPosX, int nPosY, CCHImageData* pAoiDark, CCHImageData *pAoiBright) |
| | | { |
| | | // 3. �˻� ���� �̹��� ã�� |
| | | CString strAoiDarkPath = _T(""); |
| | | CString strAoiBrightPath = _T(""); |
| | | |
| | | FindAoiDefectImagePath(strGlassID, nOpticType, nPosX, nPosY, strAoiDarkPath, strAoiBrightPath); |
| | | |
| | | // Dark, Bright 占쏙옙占?찾占쏙옙 占쏙옙占쏙옙 占쌍쇽옙처占쏙옙 [2017.7.1 bhs] |
| | | // Dark image |
| | | //if(nOpticType & DEFECT_OPTIC_DARK) |
| | | { |
| | |
| | | CFileFind finder; |
| | | CString strSearchPath = _T(""); |
| | | |
| | | // Dark, Bright 占쏙옙占?찾占쏙옙 占쏙옙占쏙옙 占쌍쇽옙처占쏙옙 [2017.7.1 bhs] |
| | | //if (nOpticType & DEFECT_OPTIC_DARK) |
| | | { |
| | | // Dark field |
| | |
| | | processTimer.End(); |
| | | } |
| | | |
| | | // 4-3. 占쏙옙占쏙옙占쏙옙占?占쏙옙占? |
| | | double dAverageGray = 0.0; |
| | | if (CCHImageProcess::ImageAverage(&bandImage, dAverageGray)==1) |
| | | { |
| | |
| | | CCHImageData pReviewCam; |
| | | CCHImageData tempImage1; |
| | | |
| | | // ������ �̹��� ȸ�� |
| | | if (m_nImageRotate > 0) |
| | | { |
| | | tempImage1.CopyImageFrom(pReviewCamSource); |
| | | CCHImageProcess::ImageRotate(pReviewCamSource, &tempImage1, (90.0*m_nImageRotate)); |
| | | } |
| | | |
| | | // ������ �̹��� ���� |
| | | if (m_nimageFlip > 0) |
| | | { |
| | | if(m_nImageRotate > 0) |
| | |
| | | |
| | | // set total size * scale |
| | | int nTotalWidth = int(m_nReviewResizeWidth * m_dReviewImageScale + 0.5); |
| | | // 20170817 smok Dark, Bright �̹����� ���� �̹��� �Ʒ��� �ٵ��� ���� |
| | | int nTotalHeight = int(m_nReviewResizeHeight * m_dReviewImageScale + 0.5 + max(pAoiDark2.GetHeight(), pAoiBright2.GetHeight())); |
| | | int nTotalHeight2 = int(m_nReviewResizeHeight * m_dReviewImageScale + 0.5); |
| | | |
| | |
| | | double dRulerGab = 20.0 / m_dReviewImageScale; |
| | | double dScaleResolution = pReviewResult->dMeasureResolution / m_dReviewImageScale; |
| | | |
| | | //DrawRuler(&memDC, nTotalWidth, nTotalHeight2, dScaleResolution, dRulerGab); // resolution, ruler gab //taek 210127 占쏙옙占?X |
| | | //DrawRuler(&memDC, nTotalWidth, nTotalHeight2, dScaleResolution, dRulerGab); // resolution, ruler gab //taek 210127 |
| | | |
| | | // draw text string |
| | | DrawDefectInfo(&memDC, findResult, pReviewResult); |
| | | |
| | | //DrawAoiImage(&memDC, &pAoiDark2, &pAoiBright2, &pAoiDark2, &pAoiBright2, nAoiWidth, nAoiHeight); |
| | | |
| | | // draw line ���� ������ |
| | | //DrawCenterLine(&memDC, nTotalWidth, nTotalHeight); |
| | | // DrawCenterRect(&memDC, nTotalWidth, nTotalHeight, 100, 100, pReviewResult->dMeasureResolution); |
| | | |
| | |
| | | |
| | | nWidthDark = nHeightDark = nWidthBright = nHeightBright = 0; |
| | | |
| | | // 20170817 smok Dark, Bright �̹����� ���� �̹��� �Ʒ��� �ٵ��� ���� |
| | | // 20170817 smok Dark, Bright |
| | | // dark |
| | | CCHImageData subImage; |
| | | if(pAoiDark!=NULL && pAoiDark->GetImageExist()) |
| | |
| | | int nTotalWidth = int(m_nReviewResizeWidth * m_dReviewImageScale + 0.5); |
| | | int nTotalHeight = int(m_nReviewResizeHeight * m_dReviewImageScale + 0.5); |
| | | |
| | | // Dark, Bright 占싱뱄옙占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙 占쌕듸옙占쏙옙 占쏙옙占쏙옙, Dark 占쏙옙, Bright 占싣뤄옙 - 占쏙옙占쏙옙占?占쏙옙청[2017.6.30 bhs] |
| | | //int nX = nTotalWidth - nWidth; |
| | | //int nY = nTotalHeight - (nHeight * 2); |
| | | |
| | | // 20170817 smok Dark, Bright �̹����� ���� �̹��� �Ʒ��� �ٵ��� ���� |
| | | int nX = 0; |
| | | int nY = nTotalHeight; |
| | | pAoiDark1->ShowImage(pDC->m_hDC, nX, nY, pAoiDark1->GetWidth(), pAoiDark1->GetHeight(), 0, 0); |
| | |
| | | //pAoiDark1->ShowImage(pDC->m_hDC, nTotalWidth - nWidth, nTotalHei4ght-nHeight, pAoiDark1->GetWidth(), pAoiDark1->GetHeight(), 0, 0); |
| | | //pAoiBright1->ShowImage(pDC->m_hDC, nTotalWidth - nWidth, nTotalHeight-nHeight, pAoiBright1->GetWidth(), pAoiBright1->GetHeight(), 0, 0); |
| | | |
| | | // 占싯삼옙 占싱뱄옙占쏙옙 占쌩앙울옙 화占쏙옙표 표占쏙옙 - 占쏙옙占쏙옙占?占쏙옙청 [2017.6.30 bhs] |
| | | CFont Font; |
| | | VERIFY(Font.CreateFont( |
| | | 50, // nHeight |
| | |
| | | CFont *pOldFont = pDC->SelectObject(&Font); |
| | | pDC->SetTextColor(RGB(255,0,0)); |
| | | |
| | | CString strArrow = _T("��"); |
| | | CString strArrow = _T("↗"); |
| | | CSize size = pDC->GetTextExtent(strArrow); |
| | | int nCenterX = nX + (nWidth / 2) - size.cx; |
| | | int nCenterY = nY + (nHeight / 2)/* + (size.cy / 2)*/; |
| | |
| | | else { |
| | | wchar_t pstrPrefix[128] ={}; |
| | | |
| | | //Zone �ѹ� 210127 |
| | | int nValue = 0; |
| | | for (int i = 15; i >= 0; i--) |
| | | { |
| | |
| | | } |
| | | |
| | | //taek 210127 |
| | | //占쏙옙占쏙옙占쏙옙占?占쏙옙표占쏙옙 y 占쏙옙 *-1占쏙옙 占쏙옙占쏙옙 |
| | | //���� ID, �˻� ī�� ����, �˻� Camera ���� : (? ) ķ ?, Cell ID, Review Cam ���� : Gantry ����, ���� Size, ���� Zone ����, Stak Flag, CODE ����, ��ǥ ���� |
| | | |
| | | // PPID |
| | | // strValue.Format(_T("Tool[%s].Recipe[%s].ScanNo[%d/%d].Time[%4d/%2d/%2d_%d:%d:%d].MaxGray[%d].RefGray[%d].REVCnt[%d]"),pReviewResult->strEquipID,pGlassResult->m_strPPID,pReviewResult->nAOIScanIdx,0,snapTime.GetYear(), snapTime.GetMonth(), snapTime.GetDay(), |
| | |
| | | |
| | | if(GetReviewProcessStatus() == ReviewProcessStatus_ReflowStart) |
| | | { |
| | | // [2017:6:5]-[WEZASW] : Review Image 占쏙옙占싹몌옙占?'*' 占쏙옙占?占쏙옙占쏙옙.(占쏙옙占쏙옙처占쏙옙) |
| | | // [2017:6:5]-[WEZASW] : Review Image |
| | | if (pReviewResult->strDefectCode.Compare(_T("***")) == 0) |
| | | strDefectCodeTemp = _T("DC"); |
| | | else |
| | |
| | | // strFileName += pReviewResult->strSnapTime; |
| | | // } |
| | | |
| | | // [2017:4:10]-[WEZASW] : 占쏙옙占쏙옙占?占쏙옙청占쏙옙 占쏙옙占쏙옙 bmp 占쏙옙占쏙옙 占쌩곤옙 占쏙옙占쏙옙. (占쌈시삼옙占? |
| | | // [2017:4:10]-[WEZASW] : |
| | | pReviewResult->strOrignalImgFileName = strFileName + _T(".bmp"); |
| | | |
| | | strFileName += _T(".jpg"); |
| | |
| | | int nStartResultIdx = pReviewResult->GetStartSReviewResultIndex(); |
| | | int nEndResultIdx = pReviewResult->GetEndSReviewResultIndex(); |
| | | |
| | | // �ε����� ���� ������ �ε��� ���� Ŭ��.. |
| | | if (nCurResultIdx > nEndResultIdx) |
| | | { |
| | | LeaveCriticalSection(&m_csUserCriticalSection); |
| | |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]SetWsiResultData module[%d] point[%d] result[%d]"), nModuleIndex, measureResut.nResultIndex, nCurResultIdx); |
| | | } |
| | | |
| | | // 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 |
| | | wsiResult.nWsi_ResultCode = measureResut.nResultCode; |
| | | wsiResult.dWsi_DamDistance = measureResut.dDamDistance; |
| | | |
| | |
| | | } |
| | | //memcpy(wsiResult.nWsi_pReflowResultData, measureResut.pReflowResultData, sizeof(wsiResult.nWsi_pReflowResultData)); |
| | | |
| | | // 占쏙옙占?占쏙옙占쏙옙占쏙옙 占쌩곤옙 |
| | | SReviewResult *pProcessResult = NULL; |
| | | if (pGlassResult->SetWsiReflowResultData(nModuleIndex, nCurResultIdx, wsiResult, nGlassPosX, nGlassPosY, nMotorPosX, nMotorPosY, dTime)) |
| | | { |
| | |
| | | pProcessResult = pReviewResult->GetSReviewResult(nCurResultIdx); |
| | | } |
| | | |
| | | // ���� ������, ���� ������� ������ ���� |
| | | if (pProcessResult) |
| | | { |
| | | // ó�� ������ ���� |
| | | if (AddReviewProcessData(pProcessResult)==1) |
| | | { |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]Add Wsi Reflow Process Data module[%d] result[%d]"), nModuleIndex, nCurResultIdx); |
| | |
| | | |
| | | LeaveCriticalSection(&m_csUserCriticalSection); |
| | | |
| | | // 占쏙옙占?占쏙옙占쏙옙. |
| | | m_pRP2P->IRP2P_UpdateReviewResult(nModuleIndex, pGlassResult, 5); |
| | | return; |
| | | |
| | |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor]WsiResult FAIL! module[%d] result[%d]"), nModuleIndex, measureResut.nResultIndex); |
| | | return; |
| | | } |
| | | |
| | | //0129cmark ���� ��ġ�� ���� ��ǥ�� ���� ��ǥ�� ���� |
| | | |
| | | double CReviewProcessor_CPJT::GetCentertoOrginCoordinate(double dPosX,double dPosY,int nCornercut,int nOriginDirection){ |
| | | |
| | | double nResultPosX=0.0; |
| | |
| | | // CornerCutDirection { CLeftTop=0, CRightTop, CLeftBottom, CRightBottom }; |
| | | // OriginDirection { OLeftTop=0, ORightTop, OLeftBottom, ORightBottom }; |
| | | |
| | | if(nOriginDirection==RPOLeftTop){//�������»� |
| | | if(nOriginDirection==RPOLeftTop){ |
| | | |
| | | if(nCornercut == RPCLeftTop)//�»� |
| | | if(nCornercut == RPCLeftTop) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. - dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. - dPosY; |
| | | |
| | | } |
| | | else if(nCornercut == RPCRightTop)//占쏙옙占? |
| | | else if(nCornercut == RPCRightTop) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. - dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. + dPosY; |
| | | |
| | | } |
| | | else if(nCornercut == RPCLeftBottom)//���� |
| | | else if(nCornercut == RPCLeftBottom) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. + dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. - dPosY; |
| | | } |
| | | else if(nCornercut == RPCRightBottom)//���� |
| | | else if(nCornercut == RPCRightBottom) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2 + dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2 + dPosY; |
| | | } |
| | | } |
| | | |
| | | else if(nOriginDirection==RPORightTop){//占쏙옙占쏙옙占쏙옙占쏙옙占? |
| | | else if(nOriginDirection==RPORightTop){ |
| | | |
| | | if(nCornercut == RPCLeftTop)//�»� |
| | | if(nCornercut == RPCLeftTop) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. - dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. + dPosY; |
| | | |
| | | } |
| | | else if(nCornercut == RPCRightTop)//占쏙옙占? |
| | | else if(nCornercut == RPCRightTop) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. - dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. - dPosY; |
| | | |
| | | } |
| | | else if(nCornercut == RPCLeftBottom)//���� |
| | | else if(nCornercut == RPCLeftBottom) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. + dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. + dPosY; |
| | | } |
| | | else if(nCornercut == RPCRightBottom)//���� |
| | | else if(nCornercut == RPCRightBottom) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. + dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. - dPosY; |
| | | } |
| | | } |
| | | else if(nOriginDirection==RPOLeftBottom){//���������� |
| | | else if(nOriginDirection==RPOLeftBottom){ |
| | | |
| | | if(nCornercut == RPCLeftTop)//�»� |
| | | if(nCornercut == RPCLeftTop) |
| | | { |
| | | //210402 |
| | | /* nResultPosX = double(GLASS_SIZE_WIDTH)/2. + dPosX; |
| | |
| | | nResultPosX = double(GLASS_SIZE_WIDTH) / 2. + dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT) / 2. + dPosY; |
| | | } |
| | | else if(nCornercut == RPCRightTop)//占쏙옙占? |
| | | else if(nCornercut == RPCRightTop) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. + dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. + dPosY; |
| | | |
| | | } |
| | | else if(nCornercut == RPCLeftBottom)//���� |
| | | else if(nCornercut == RPCLeftBottom) |
| | | { |
| | | //210402 |
| | | /*nResultPosX = double(GLASS_SIZE_WIDTH)/2. - dPosX; |
| | |
| | | nResultPosX = double(GLASS_SIZE_WIDTH) / 2. + dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT) / 2. + dPosY; |
| | | } |
| | | else if(nCornercut == RPCRightBottom)//���� |
| | | else if(nCornercut == RPCRightBottom) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH) / 2. - dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT) / 2. + dPosY; |
| | | } |
| | | } |
| | | else if (nOriginDirection==RPORightBottom) |
| | | {//���������� |
| | | { |
| | | |
| | | if(nCornercut == RPCLeftTop)//�»� |
| | | if(nCornercut == RPCLeftTop) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. + dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. + dPosY; |
| | | |
| | | } |
| | | else if(nCornercut == RPCRightTop)//占쏙옙占? |
| | | else if(nCornercut == RPCRightTop) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. + dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. - dPosY; |
| | | |
| | | } |
| | | else if(nCornercut == RPCLeftBottom)//���� |
| | | else if(nCornercut == RPCLeftBottom) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. - dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. + dPosY; |
| | | } |
| | | else if(nCornercut == RPCRightBottom)//���� |
| | | else if(nCornercut == RPCRightBottom) |
| | | { |
| | | nResultPosX = double(GLASS_SIZE_WIDTH)/2. - dPosX; |
| | | nResultPosY = double(GLASS_SIZE_HEIGHT)/2. - dPosY; |
| | |
| | | CString strFileName = _T(""); |
| | | CString strDefectCodeTemp = _T(""); |
| | | |
| | | // [2017:6:5]-[WEZASW] : Review Image 占쏙옙占싹몌옙占?'*' 占쏙옙占?占쏙옙占쏙옙.(占쏙옙占쏙옙처占쏙옙) |
| | | // [2017:6:5]-[WEZASW] : Review Image |
| | | if (pReviewResult->strDefectCode.Compare(_T("***")) == 0) |
| | | strDefectCodeTemp = _T("DC"); |
| | | else |
| | |
| | | { |
| | | if(pReviewResult == NULL) return FALSE; |
| | | |
| | | //占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 占쌨몌옙 占쏙옙占쏙옙 占싱뱄옙占쏙옙 占싱몌옙 占쏙옙 占쏙옙표 채占쏙옙占쌍깍옙 |
| | | CDitGlassRawClient *pDitGlassRawCleint = CDitGlassRawClient::GetInstance(); |
| | | if(pDitGlassRawCleint->isConnect() == TRUE) |
| | | { |
| | |
| | | |
| | | strcpy(pSharedDefectReview->m_strRevImageName,pReviewResult->strImgFileName.MakeLower()); |
| | | |
| | | //taek 210624 ���� ���� �� ���ش�. |
| | | //taek 210624 |
| | | |
| | | strcpy(pSharedDefectReview->m_strRevImagePath,pReviewResult->strImgFilePath.MakeLower()); |
| | | |
| | | strcpy(pSharedGlassData->m_strAlignFirst, m_strReviewFirst.MakeLower()); |
| | | strcpy(pSharedGlassData->m_strAlignSecond, m_strReviewSecned.MakeLower()); |
| | | |
| | | pSharedDefectReview->m_nPlanType = ditRaw::RPT_Review; //0:None, 1:Location(User, Fiexed) Review, 4:reflower, ??:Wsi, 1000:AOI(占쌤븝옙 占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占? |
| | | pSharedDefectReview->m_nPlanType = ditRaw::RPT_Review; //0:None, 1:Location(User, Fiexed) Review, 4:reflower, ??:Wsi, 1000:AOI( |
| | | pSharedDefectReview->m_nResultCode = 1; //0:None, 1:Success |
| | | pSharedDefectReview->m_nShotIndex = pReviewResult->nResultIdx; |
| | | //pSharedDefectReview->m_nShotIndex = GetPlanReviewCount(); //RTMS 占쏙옙占쌔울옙 占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙 占쏙옙占?占싣니몌옙 占쏙옙占쏙옙占쏙옙 占싹댐옙 占심뤄옙 taek 210128 |
| | | //pSharedDefectReview->m_nShotIndex = GetPlanReviewCount(); //RTMS taek 210128 |
| | | pSharedDefectReview->m_nModuleIndex = pReviewResult->nModuleIdx; |
| | | pSharedDefectReview->m_nMagnificIndex = 20; |
| | | pSharedDefectReview->m_fManification =pReviewResult->dMagnification; |
| | |
| | | |
| | | BOOL CReviewProcessor_CPJT::UpdateMemoryUserPlan( SReviewResult* pReviewResult ) |
| | | { |
| | | //占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 占쌨몌옙 占쏙옙占쏙옙 占싱뱄옙占쏙옙 占싱몌옙 占쏙옙 占쏙옙표 채占쏙옙占쌍깍옙 |
| | | CDitGlassRawClient *pDitRawClient = CDitGlassRawClient::GetInstance(); |
| | | if(pDitRawClient->isConnect() == TRUE) |
| | | { |
| | | int nDefectCount = pDitRawClient->GetGlassData()->m_nDefectNum; // user,reflow �� �˻� ���� ���� �����DZ ���� ī��Ʈ���� ���ų� ū���� ������ �ִ� |
| | | int nDefectCount = pDitRawClient->GetGlassData()->m_nDefectNum; // user,reflow |
| | | if(pReviewResult->nDefectIdx <nDefectCount) |
| | | { |
| | | return FALSE; |
| | |
| | | |
| | | strcpy(pSharedDefectReview->m_strRevImageName,pReviewResult->strImgFileName); |
| | | |
| | | pSharedDefectReview->m_nPlanType = ditRaw::RPT_User; //0:None, 1:Location(User, Fiexed) Review, 4:reflower, ??:Wsi, 1000:AOI(占쌤븝옙 占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙占? |
| | | pSharedDefectReview->m_nPlanType = ditRaw::RPT_User; //0:None, 1:Location(User, Fiexed) Review, 4:reflower, ??:Wsi, 1000:AOI( |
| | | pSharedDefectReview->m_nResultCode = 1; //0:None, 1:Success |
| | | pSharedDefectReview->m_nShotIndex = pReviewResult->nResultIdx; |
| | | pSharedDefect->m_nShotIdx = pReviewResult->nResultIdx; |
| | |
| | | pSharedDefectReview->m_nMagnificIndex = pReviewResult->dMagnification; |
| | | pSharedDefectReview->m_fManification = pReviewResult->dMagnification; |
| | | pSharedDefectReview->m_fManificResoultion = pReviewResult->dMagnification; |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("[����������]�ε���[%d]���ϸ�[%s]"),pReviewResult->nDefectidx2, pReviewResult->strUploadImgFileName); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("[Access Shared Memory]IDX[%d]Filename[%s]"),pReviewResult->nDefectidx2, pReviewResult->strUploadImgFileName); |
| | | } |
| | | |
| | | |
| | |
| | | BOOL CReviewProcessor_CPJT::UpdateMemoryReflowPlan( SReviewResult* pReviewResult ) |
| | | { |
| | | if(pReviewResult == NULL) return FALSE; |
| | | //占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 占쌨모리울옙 占쏙옙占?채占쏙옙 占쌍깍옙 |
| | | CDitGlassRawClient *pDitRawClient = CDitGlassRawClient::GetInstance(); |
| | | //int nEqpID = m_pSP2P->ISP2P_System_GetSystemInfo()->m_nMachineType; |
| | | CString strCellID = _T(""); |
| | |
| | | nReflowjuge=1; |
| | | } |
| | | |
| | | // 占쏙옙占쏙옙占?占쏙옙청占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙. 0,1 Position占쏙옙 Pass |
| | | else if(nReflowjuge == 3 || nReflowjuge == 2) |
| | | { |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("[ReflowResult] Reflow Judge Is No OverFlow %d"),nReflowjuge); |
| | |
| | | nReflowjuge=0; |
| | | } |
| | | |
| | | //0:None, // ������ Line�� ����. 3 �̸� : DAM2 Reflow ����, 4~5 : DAM1 Reflow ����, 6 : no Reflow ���� / -1 : image not loaded, -2 : roi setting error, -3 : roi length error, -5 : select wrong side |
| | | if(pReviewResult->nReflow_CellIndex > 7) |
| | | { |
| | | pReviewResult->nReflow_CellIndex = 0; |
| | |
| | | |
| | | if(pDitRawClient->isConnect() == TRUE) |
| | | { |
| | | int nDefectCount = pDitRawClient->GetGlassData()->m_nDefectNum; // user,reflow �� �˻� ���� ���� �����DZ ���� ī��Ʈ���� ���ų� ū���� ������ �ִ� |
| | | int nDefectCount = pDitRawClient->GetGlassData()->m_nDefectNum; |
| | | if(pReviewResult->nDefectidx2 <nDefectCount) |
| | | { |
| | | return FALSE; |
| | |
| | | |
| | | pSharedDefectReview->m_nPlanType = ditRaw::RTP_Reflow; |
| | | pSharedDefectReview->m_nReflow_ResultCode = pReviewResult->nReflow_Result;// pReviewResult->nReflow_Result; |
| | | //0:None, // ������ Line�� ����. 3 �̸� : DAM2 Reflow ����, 4~5 : DAM1 Reflow ����, 6 : no Reflow ���� / -1 : image not loaded, -2 : roi setting error, -3 : roi length error, -5 : select wrong side |
| | | //pSharedDefectReview->m_fReflow_LinePosData; |
| | | pSharedDefectReview->m_nReflow_Side = pReviewResult->nReflow_Side; |
| | | pSharedDefectReview->m_nReflow_InspectionMode = 0; |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("[����������]�ε���[%d]���ϸ�[%s]"),pReviewResult->nDefectidx2, pReviewResult->strUploadImgFileName); |
| | | m_pRP2P->IRP2P_DisplayMessage(_T("[Access Shared Memory]IDX[%d]Filename[%s]"),pReviewResult->nDefectidx2, pReviewResult->strUploadImgFileName); |
| | | } |
| | | |
| | | return TRUE; |
| | |
| | | { |
| | | if(pReviewResult == NULL) return FALSE; |
| | | |
| | | //占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 占쌨모리울옙 占쏙옙占?채占쏙옙 占쌍깍옙 |
| | | CDitGlassRawClient *pDitGlassRawClient = CDitGlassRawClient::GetInstance(); |
| | | |
| | | if(pDitGlassRawClient->isConnect() == TRUE) |
| | |
| | | |
| | | pSharedDefectReview->m_nPlanType = ditRaw::RTP_WSI; |
| | | pSharedDefectReview->m_nWsi_ResultCode=pReviewResult->nWsi_ResultCode; //0:None, 1:Success |
| | | pSharedDefectReview->m_nWsi_Type = 2;/* nWSIType; // �Ը� / ���� //wsi ���� */ |
| | | pSharedDefectReview->m_nWsi_Type = 2; |
| | | pSharedDefectReview->m_fWsi_ResultData[0]= pReviewResult->nWsi_DefectType; // 0:normal 1:metal 2:huge 3:diffuse 4:trashy |
| | | pSharedDefectReview->m_fWsi_ResultData[1]=(float)(nWSIheight/1000.0); |
| | | pSharedDefectReview->m_fWsi_ResultData[2]=(float)(nWSIWidth/1000.0); // 0:Type, 1:Height, 2:Width |
| | |
| | | pSharedDefectReview->m_fWsi_ResultData[6] = pReviewResult->dBZoneHeight; |
| | | pSharedDefectReview->m_strWsi_2DImageFilename; |
| | | pSharedDefectReview->m_strWsi_3DImageFilename; |
| | | pSharedDefectReview->m_fWsiManification = 20;//20�� ���� |
| | | pSharedDefectReview->m_fWsiManification = 20; |
| | | pSharedDefectReview->m_dWsiMmMotorX=pReviewResult->dTargetMotorX; |
| | | pSharedDefectReview->m_dWsiMmMotorY=pReviewResult->dTargetMotorY; |
| | | |
| | |
| | | BOOL CReviewProcessor_CPJT::UpdateMemoryWsiReflowPlan( SReviewResult* pReviewResult ) |
| | | { |
| | | if(pReviewResult == NULL) return FALSE; |
| | | //占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 占쌨모리울옙 占쏙옙占?채占쏙옙 占쌍깍옙 |
| | | CDitGlassRawClient *pDitRawClient = CDitGlassRawClient::GetInstance(); |
| | | |
| | | |
| | |
| | | |
| | | int nWsiReflowResult = 0; |
| | | int nWsiReflowJudge = -1; |
| | | |
| | | /* |
| | | pPacket->GetInt(0) = Index |
| | | pPacket->GetInt(1) = Wsi 占쏙옙占쏙옙 占쏙옙占? |
| | | pPacket->GetInt(2) = A占쏙옙 占쏙옙占쏙옙 占쏙옙占?(1 占쏙옙占쏙옙 0 占쏙옙占쏙옙) |
| | | pPacket->GetInt(3) = B占쏙옙 占쏙옙占쏙옙 占쏙옙占? |
| | | pPacket->GetInt(4) = C占쏙옙 占쏙옙占쏙옙 占쏙옙占? |
| | | pPacket->GetInt(5) = D占쏙옙 占쏙옙占쏙옙 占쏙옙占? |
| | | pPacket->GetInt(6) = Review占쏙옙占쏙옙 占쏙옙占쏙옙占쏙옙占?PointIndex |
| | | pPacket->GetDouble(0) = �£�� Monomo������ �Ÿ� |
| | | */ |
| | | |
| | | // int nReflowjuge=0; |
| | | // for(int nZone=2; nZone<6; nZone++) |
| | |
| | | |
| | | nWsiReflowJudge = pReviewResult->nWsi_ResultCode; |
| | | |
| | | //nWsiReflowResult += pReviewResult->nWsi_pReflowResultData[0] //A 1占쏙옙 占신곤옙횡占? |
| | | //nWsiReflowResult += pReviewResult->nWsi_pReflowResultData[0] //A |
| | | nWsiReflowResult += pReviewResult->nWsi_pReflowResultData[1];//B |
| | | nWsiReflowResult += pReviewResult->nWsi_pReflowResultData[2];//C |
| | | //nWsiReflowResult += pReviewResult->nWsi_pReflowResultData[3];//D |
| | |
| | | { |
| | | if(pReviewResult == NULL) return FALSE; |
| | | |
| | | //占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 占쌨모리울옙 占쏙옙占?채占쏙옙 占쌍깍옙 |
| | | CDitGlassRawClient *pDitGlassRawClient = CDitGlassRawClient::GetInstance(); |
| | | |
| | | if(pDitGlassRawClient->isConnect() == TRUE) |
| | |
| | | |
| | | pSharedDefectReview->m_nPlanType = ditRaw::RTP_UserWsi; |
| | | pSharedDefectReview->m_nWsi_ResultCode=pReviewResult->nWsi_ResultCode; //0:None, 1:Success |
| | | pSharedDefectReview->m_nWsi_Type=nWSIType; // �Ը� / ���� |
| | | pSharedDefectReview->m_nWsi_Type=nWSIType; |
| | | pSharedDefectReview->m_fWsi_ResultData[0]= nWSIType; |
| | | pSharedDefectReview->m_fWsi_ResultData[1]=(float)(nWSIheight/100.0); |
| | | pSharedDefectReview->m_fWsi_ResultData[2]=(float)(nWSIWidth/100.0); // 0:Type, 1:Height, 2:Width |
| | | pSharedDefectReview->m_strWsi_2DImageFilename; |
| | | pSharedDefectReview->m_strWsi_3DImageFilename; |
| | | pSharedDefectReview->m_fWsiManification = 20;//20�� ���� |
| | | pSharedDefectReview->m_fWsiManification = 20; |
| | | pSharedDefectReview->m_dWsiMmMotorX=pReviewResult->dTargetMotorX; |
| | | pSharedDefectReview->m_dWsiMmMotorY=pReviewResult->dTargetMotorY; |
| | | } |
| | |
| | | { |
| | | if (pReviewResult == NULL) return FALSE; |
| | | |
| | | //占쏙옙占쏙옙占쏙옙占?占쏙옙占쏙옙 占쌨모리울옙 占쏙옙占?채占쏙옙 占쌍깍옙 |
| | | CDitGlassRawClient *pDitGlassRawClient = CDitGlassRawClient::GetInstance(); |
| | | |
| | | if (pDitGlassRawClient->isConnect() == TRUE) |
| | |
| | | |
| | | pSharedDefectReview->m_nPlanType = ditRaw::RTP_WSI; |
| | | pSharedDefectReview->m_nWsi_ResultCode = pReviewResult->nWsi_ResultCode; //0:None, 1:Success |
| | | pSharedDefectReview->m_nWsi_Type = nWSIType; // �Ը� / ���� |
| | | pSharedDefectReview->m_nWsi_Type = nWSIType; |
| | | pSharedDefectReview->m_fWsi_ResultData[0] = nWSIType; |
| | | pSharedDefectReview->m_fWsi_ResultData[1] = (float)(nWSIheight / 100.0); |
| | | pSharedDefectReview->m_fWsi_ResultData[2] = (float)(nWSIWidth / 100.0); // 0:Type, 1:Height, 2:Width |
| | | pSharedDefectReview->m_strWsi_2DImageFilename; |
| | | pSharedDefectReview->m_strWsi_3DImageFilename; |
| | | pSharedDefectReview->m_fWsiManification = 20;//20�� ���� |
| | | pSharedDefectReview->m_fWsiManification = 20; |
| | | pSharedDefectReview->m_dWsiMmMotorX = pReviewResult->dTargetMotorX; |
| | | pSharedDefectReview->m_dWsiMmMotorY = pReviewResult->dTargetMotorY; |
| | | |
| | |
| | | BYTE *pImageBufferByte = (BYTE*)(pImageBuffer); |
| | | if (pImageBuffer==NULL) return 0.; |
| | | |
| | | //#3524_210902_LYW_MOD START |
| | | int nWidth = nImageWidth; |
| | | //int nWidthStep = nImageWidth; |
| | | int nHeight = nImageHeight; |
| | | int nCalWidth = nWidth/2; |
| | | int nCalHeight = nHeight/2; |
| | | // int nCalWidth = nWidth/2; |
| | | // int nCalHeight = nHeight/2; |
| | | // |
| | | // int nStartX = nWidth/2 - nCalWidth/2; |
| | | // int nStartY = nHeight/2 - nCalHeight/2; |
| | | |
| | | int nStartX = nWidth/2 - nCalWidth/2; |
| | | int nStartY = nHeight/2 - nCalHeight/2; |
| | | int nCalWidth = nWidth; |
| | | int nCalHeight = nHeight; |
| | | |
| | | // |
| | | double Focusvalue = 0; |
| | | double SumValue = 0; |
| | | double TempValue = 0; |
| | | double m_nResultFocusValue = 0; |
| | | int nStartX = 0; |
| | | int nStartY = 0; |
| | | |
| | | // ���� XY ���� X+1, Y+1�� ���� ������ |
| | | for (int y = 0; y < nHeight - 1; y++) |
| | | int nStep = 3; |
| | | |
| | | double dXValue = 0., dYValue = 0., dCurr = 0., dSum = 0., dFocus = 0.; |
| | | for (int nH = nStartY; nH < nStartY + nCalHeight - nStep; nH++) |
| | | { |
| | | for (int x = 0; x < nWidth - 1; x++) |
| | | for (int nW = nStartX; nW < nStartX + nCalWidth - nStep; nW++) |
| | | { |
| | | TempValue = (double)(pImageBufferByte[y*nWidth + x] - pImageBufferByte[y*nWidth + x + 1]); |
| | | SumValue = TempValue * TempValue; |
| | | TempValue = (double)(pImageBufferByte[y*nWidth + x] - pImageBufferByte[(y + 1)*nWidth + x]); |
| | | SumValue += TempValue * TempValue; |
| | | |
| | | Focusvalue += sqrt(SumValue); |
| | | //Focusvalue += SumValue; |
| | | } |
| | | } |
| | | |
| | | m_nResultFocusValue = int(Focusvalue / (double)(nWidth*nHeight)); |
| | | |
| | | double dXValue=0., dYValue=0., dCurr=0., dSum=0., dFocus=0.; |
| | | for(int nH=nStartY ; nH<nStartY+nCalHeight-1 ; nH++) |
| | | { |
| | | for(int nW=nStartX ; nW<nStartX+nCalWidth-1 ; nW++) |
| | | { |
| | | dXValue = float((pImageBufferByte[nH*nW + nW+1] - pImageBufferByte[nH*nW + nW])*(pImageBufferByte[nH*nW + nW+1] - pImageBufferByte[nH*nW + nW])); |
| | | dYValue = float((pImageBufferByte[(nH+1)*nW + nW] - pImageBufferByte[nH*nW + nW])*(pImageBufferByte[(nH+1)*nW + nW] - pImageBufferByte[nH*nW + nW])); |
| | | dXValue = float((pImageBufferByte[nH*nWidth + nW + nStep] - pImageBufferByte[nH*nWidth + nW])*(pImageBufferByte[nH*nWidth + nW + nStep] - pImageBufferByte[nH*nWidth + nW])); |
| | | dYValue = float((pImageBufferByte[(nH + nStep)*nWidth + nW] - pImageBufferByte[nH*nWidth + nW])*(pImageBufferByte[(nH + nStep)*nWidth + nW] - pImageBufferByte[nH*nWidth + nW])); |
| | | dCurr = sqrt(dXValue + dYValue); |
| | | //break; |
| | | |
| | | dSum += dCurr; |
| | | } |
| | | } |
| | | dFocus = dSum/double(nCalWidth*nCalHeight); |
| | | dFocus = dSum / double(nCalWidth*nCalHeight); |
| | | |
| | | if (dFocus >= 9.8) dFocus = 10.0; |
| | | else dFocus += 0.2; |
| | | |
| | | return dFocus; |
| | | //#3524_210902_LYW_MOD END |
| | | //Origin |
| | | // int nWidth = nImageWidth; |
| | | // int nHeight = nImageHeight; |
| | | // int nCalWidth = nWidth/2; |
| | | // int nCalHeight = nHeight/2; |
| | | // |
| | | // int nStartX = nWidth/2 - nCalWidth/2; |
| | | // int nStartY = nHeight/2 - nCalHeight/2; |
| | | // |
| | | // // |
| | | // double Focusvalue = 0; |
| | | // double SumValue = 0; |
| | | // double TempValue = 0; |
| | | // double m_nResultFocusValue = 0; |
| | | // |
| | | // for (int y = 0; y < nHeight - 1; y++) |
| | | // { |
| | | // for (int x = 0; x < nWidth - 1; x++) |
| | | // { |
| | | // TempValue = (double)(pImageBufferByte[y*nWidth + x] - pImageBufferByte[y*nWidth + x + 1]); |
| | | // SumValue = TempValue * TempValue; |
| | | // TempValue = (double)(pImageBufferByte[y*nWidth + x] - pImageBufferByte[(y + 1)*nWidth + x]); |
| | | // SumValue += TempValue * TempValue; |
| | | // |
| | | // Focusvalue += sqrt(SumValue); |
| | | // //Focusvalue += SumValue; |
| | | // } |
| | | // } |
| | | // |
| | | // m_nResultFocusValue = int(Focusvalue / (double)(nWidth*nHeight)); |
| | | // |
| | | // double dXValue=0., dYValue=0., dCurr=0., dSum=0., dFocus=0.; |
| | | // for(int nH=nStartY ; nH<nStartY+nCalHeight-1 ; nH++) |
| | | // { |
| | | // for(int nW=nStartX ; nW<nStartX+nCalWidth-1 ; nW++) |
| | | // { |
| | | // dXValue = float((pImageBufferByte[nH*nW + nW+1] - pImageBufferByte[nH*nW + nW])*(pImageBufferByte[nH*nW + nW+1] - pImageBufferByte[nH*nW + nW])); |
| | | // dYValue = float((pImageBufferByte[(nH+1)*nW + nW] - pImageBufferByte[nH*nW + nW])*(pImageBufferByte[(nH+1)*nW + nW] - pImageBufferByte[nH*nW + nW])); |
| | | // dCurr = sqrt(dXValue + dYValue); |
| | | // dSum += dCurr; |
| | | // } |
| | | // } |
| | | // dFocus = dSum/double(nCalWidth*nCalHeight); |
| | | // |
| | | // return dFocus; |
| | | } |
| | | |