【vc++精品源码栏目提醒】:网学会员--在 vc++精品源码编辑为广大网友搜集整理了:文字识别VC源码 - 编程语言绩等信息,祝愿广大网友取得需要的信息,参考学习。
??????????????????ò????????????×??????±??vc??????ú????????????????°×????????????????±??????????×??????????????±????°????°×????????????×????????????????????????è??ò????????±??????????26??????ó????????×?????????????????????? -------------------------------------------------------------------------------- ±??????????±??????????×÷??????????·????°?? ×????????à??????????????ò??????????????????·??????????à??????????????°??????????¨??????????ó??????????????????¨??????????????????????ò????????????±??????????????±??????×????????¨0-9????????????í??à??????????????????è????????????×?????????????????????????? ??????????????????????è???? 1. ×??·??????×??·????????????????????????????????×??????????ù??????????????·??¨????????×??·????????????òRect. 2. ??????ó??????????????????ó????????????±ê×??×??·??±??????????????????????±?????? 26 2 52 ??????????ó????×??????????????????????????????????×??·?????? ??¨×??????????????????·¨±????????ò??????????×??????í??????????±??????????????§??????????????????????????????????·??????????????ó????±??????×?????????????????? 98????????????????????????????????????????×??????·??????????ר????????????????????????????????????±????????°??ì????±??????×????????????ò??????????????????????ó????????????????????????????±?????????????? 90 ????????×????????????????????????ó????????????????????????????????????????????????·??·¨???????????????????????? ??????ú???????????????? / ????????????????×??·??????±??????/ void CPOCRNuberDlg::GetCharRectHBITMAP bit RECT rectint type CDC pDC CString strTemp2 CBitmap bitmap bitmap.m_hObject CopyImagebitIMAGE_BITMAP00LR_MONOCHROME //CDC pDC GetDC CDC mDC mDC.CreateCompatibleDC pDC mDC.SetBoundsRect rect DCB_RESET mDC.SelectObjectbitmap.m_hObject BOOL bIsChar false corInfo new OCR_Info50 int index 0 COLORREF colPix int iR int iG / ????????????????????×????ù????????Rect / // ??????¨??è CString str for int i rect.left i rect.right i for int j rect.top - 250 j rect.bottom - 250 j colPix mDC.GetPixelij iG GetGValuecolPix // ×??·?????????? if iG 0 bIsChar corInfoindex.rect.left i corInfoindex.Index index bIsChar true break // ×??·?????????? else if iG 0 bIsChar break // ×??·????á???? else if iG 255 j rect.bottom -252 bIsChar corInfoindex.rect.right i-1 if corInfoindex.rect.right - corInfoindex.rect.left 3 index bIsChar false break CClientDC lDCthis // ??????¨??è bIsChar false int iBZ 0 for int iinx 0 iinx index iinx for int ii rect.top-250 ii rect.bottom -250 ii for int j corInfoiinx.rect.left j corInfoiinx.rect.right j colPix mDC.GetPixeljii iG GetGValuecolPix // ×??·?????????????????? if iG 0 bIsChar corInfoiinx.rect.top ii bIsChar true break // ×??·?????????? else if iG 0 bIsChar break // ×??·????×??????á???? else if iG 255 j corInfoiinx.rect.right -2 bIsChar corInfoiinx.rect.bottom ii-1 bIsChar false break / ??????????·??¨??ê????????????????×??·?????????????????????????????? corInfo.rect ????/ char m_pFilePath255 CStdioFile fInfo strcpym_pFilePathD:info.ini fInfo.Open m_pFilePath CFile::modeCreate CFile::modeWrite CDC NewDC NewDC.CreateCompatibleDCpDC CBitmap memBmp memBmp.CreateCompatibleBitmap mDC 14 20 NewDC.SelectObject memBmp / // ±ê??????¨???? iBZ 0 BOOL bBZ false for int bn 0 bn