Ejemplo n.º 1
0
        private void btnStartOCR_Click(object sender, EventArgs e)
        {
            if (picBox.Image == null)
            {
                return;
            }

            StartIdentity();
            try
            {
                string result = OCRHelper.ExecuteOCR(
                    image, Rectangle.Empty, cbLangs.SelectedValue.ToString());
                AddOCRResult(picBox.Bounds, cbLangs.Text, result);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message,
                                "OCR処理エラーが発生しました",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
            }
            finally
            {
                EndIdentity();
            }
        }
Ejemplo n.º 2
0
 public void InitializedOCR()
 {
     try
     {
         resultEng = OCRHelper.ExecuteOCR(DisplayPartation, Rectangle.Empty, "eng");
         resultJpn = OCRHelper.ExecuteOCR(DisplayPartation, Rectangle.Empty, "jpn");
     }
     catch (Exception)
     {
         throw;
     }
 }