C# 用C语言进行OCR读取#
我有一个项目,它是读取捕获的图像中的字符,但我被困在按钮,这是扫描图像。我最终在c#中创建了tesseract dll,但我不知道如何编写它。我是这个节目的新手C# 用C语言进行OCR读取#,c#,ocr,tesseract,C#,Ocr,Tesseract,我有一个项目,它是读取捕获的图像中的字符,但我被困在按钮,这是扫描图像。我最终在c#中创建了tesseract dll,但我不知道如何编写它。我是这个节目的新手 private void Browse_Click(object sender, EventArgs e) { //FileInfo fi = new FileInfo(string.Format(@"C:\Documents and Settings\JOrce0201610\My Documents\Vis
private void Browse_Click(object sender, EventArgs e)
{
//FileInfo fi = new FileInfo(string.Format(@"C:\Documents and Settings\JOrce0201610\My Documents\Visual Studio 2005\Projects\OCR Reader\{0}", imageName));
OpenFileDialog fi = new OpenFileDialog();
fi.InitialDirectory = @"C:\\Documents and Settings\JOrce0201610\My Documents\Visual Studio 2005\Projects\OCR Reader\Card";
fi.Filter = "BMP Image|*.bmp";
fi.FilterIndex = 2;
fi.RestoreDirectory = true;
if (fi.ShowDialog() == DialogResult.OK)
{
//image file path
textBox1.Text = fi.FileName;
//display image in picture box
pictureBox1.Image = new Bitmap(fi.FileName);
}
}
private void Scan_Click(object sender, EventArgs e)
{
Bitmap temp = source.Clone() as Bitmap; //Clone image to keep original image
FiltersSequence seq = new FiltersSequence();
seq.Add(Grayscale.CommonAlgorithms.BT709); //First add GrayScaling filter
seq.Add(new OtsuThreshold()); //Then add binarization(thresholding) filter
temp = seq.Apply(source); // Apply filters on source image
如果你是编程的“新手”,OCR不是最好的起点。我建议您最好使用一个Web服务或现有的库来完成这项工作
微软有,夏威夷有一个很容易使用的OCR服务。如果你是编程的“新手”,OCR不是最好的起点。我建议您最好使用一个Web服务或现有的库来完成这项工作
微软有,夏威夷有一个很容易使用的OCR服务。那么你的问题是什么?也许OCR不是新手的最佳起点?这里没有问题,但我假设你没有得到你期望的结果。我建议您阅读正在使用的OCR实现的文档。此外,通常会有教程向您展示如何操作。作为一名新手,您应该先创建一个计算器应用程序或yathzee游戏,而不是从图像中读取字符。那么您的问题是什么?也许OCR不是新手的最佳起点?这里没有问题,但我想你没有得到你期望的结果。我建议您阅读正在使用的OCR实现的文档。此外,通常会有教程向您展示如何操作。作为新手,您应该从创建计算器应用程序或yathzee游戏开始,而不是从图像中读取角色。