2017-11-27 19 views
0

저는 Aspose OCR을 가지고 놀고 있습니다. 흰색 배경과 검은 색 텍스트가있는 이미지를 읽는 것이 좋습니다. 그러나 검정색 또는 다른 색상의 배경이있는 것은 읽지 않습니다.Aspose OCR - 이미지 인식 안 함

이 문제를 해결하는 방법에 대해 알고 싶습니다.

private void timer1_Tick(object sender, EventArgs e) 
     { 
      //SendKeys.Send("{PRTSC}"); 
      Image img = Clipboard.GetImage(); 
      pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; 
      pictureBox1.Image = img; 




      if (img != null) 
      { 
       var ms = new MemoryStream(); 

       img.Save(ms, ImageFormat.Jpeg); // put here the image format 
       ms.Position = 0; 

       ocr.Image = ImageStream.FromStream(ms, ImageStreamFormat.Jpg); 

       if (ocr.Process()) // Start processing it 
       { 
        label1.Text = "Text: " + ocr.Text; 
       } 
      } 
     } 

답변

0

다음 코드 줄을 시도해 볼 수 있습니다. 또한 색상 배경 ​​이미지 처리 기능 개발이 진행 중임을 알려드립니다.

ocr.Config.ProcessColoredBackground = true; 

저는 Aspose as Developer Evangelist에서 작업합니다.

+0

절대로 작동하지 않는 :( – BCLtd