91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.36MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-10-04
  • 語言: C#
  • 標(biāo)簽: OCR??識別??C#??

資源簡介

該程序采用VS2010 通過OCR來識別0-9 包含小數(shù)點的數(shù)字識別。程序中包含樣圖。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?tessnet2;
using?System.Drawing.Imaging;
using?System.IO;

namespace?OCRText
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????textBox1.Text?=?““;
????????????Bitmap?s;
????????????Bitmap?img?=?ZoomAuto(textBox2.Text?1000?1000?out?s)?as?Bitmap;
????????????pictureBox1.Image?=?s;
????????????Tesseract?ocr?=?new?Tesseract();
????????????
????????????ocr.SetVariable(“tessedit_char_whitelist“?“0123456789.“);
????????????ocr.Init(AppDomain.CurrentDomain.baseDirectory?+?“Language“?“eng“?false);
????????????List?result?=?ocr.DoOCR(img?Rectangle.Empty);
????????????foreach?(Word?item?in?result)
????????????{
????????????????textBox1.Text?+=?item.Text;
????????????}
????????????img.Dispose();
????????}
????????///?
????????///?等比例縮放圖片
????????///?

????????///?
????????///?
????????///?
????????///?
????????///?
????????public?static?Image?ZoomAuto(string?fromFile?System.Double?targetWidth?System.Double?targetHeight?out?Bitmap?img)
????????{
????????????//原始圖片(獲取原始圖片創(chuàng)建對象,并使用流中嵌入的顏色管理信息)
????????????System.Drawing.Image?initImage?=?Image.FromFile(fromFile);
????????????img?=?new?Bitmap(initImage);
????????????double?newWidth?=?initImage.Width;
????????????double?newHeight?=?initImage.Height;

????????????//寬大于高或?qū)挼扔诟撸M圖或正方)
????????????if?(initImage.Width?>=?initImage.Height)
????????????{
????????????????newWidth?=?targetWidth;
????????????????newHeight?=?initImage.Height?*?(targetWidth?/?initImage.Width);
????????????}
????????????//高大于寬(豎圖)
????????????else
????????????{
????????????????newHeight?=?targetHeight;
????????????????newWidth?=?initImage.Width?*?(targetHeight?/?initImage.Height);
????????????}

????????????//生成新圖
????????????//新建一個bmp圖片
????????????System.Drawing.Image?newImage?=?new?System.Drawing.Bitmap((int)newWidth?(int)newHeight);
????????????//新建一個畫板
????????????System.Drawing.Graphics?newG?=?System.Drawing.Graphics.FromImage(newImage);

????????????//設(shè)置質(zhì)量
????????????newG.InterpolationMode?=?System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
????????????newG.SmoothingMode?=?System.Drawing.Drawing2D.SmoothingMode.HighQuality;

????????????//置背景色
????????????newG.Clear(Color.White);
????????????//畫圖
????????????newG.DrawImage(initImage?new?System.Drawing.Rectangle(0?0?newImage.Width?newImage.Height)?new?System.Drawing.Rectangle(0?0?initImage.Width?initImage.Height)?System.Drawing.GraphicsUnit.Pixel);


????????????newG.

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????1525??2019-10-21?13:19??obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????6926??2019-10-21?13:20??obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件????????898??2013-03-13?14:55??obj\x86\Debug\GenerateResource-ResGen.read.1.tlog

?????文件???????1338??2013-03-13?14:55??obj\x86\Debug\GenerateResource-ResGen.write.1.tlog

?????文件???????3541??2019-10-21?13:20??obj\x86\Debug\OCRText.csproj.FileListAbsolute.txt

?????文件????????774??2019-10-21?13:20??obj\x86\Debug\OCRText.csproj.GenerateResource.Cache

?????文件???????7466??2019-10-21?13:16??obj\x86\Debug\OCRText.csprojResolveAssemblyReference.cache

?????文件??????10752??2019-10-21?13:20??obj\x86\Debug\OCRText.exe

?????文件????????180??2019-10-21?13:20??obj\x86\Debug\OCRText.Form1.resources

?????文件??????26112??2019-10-21?13:20??obj\x86\Debug\OCRText.pdb

?????文件????????180??2019-10-21?13:20??obj\x86\Debug\OCRText.Properties.Resources.resources

?????文件??????????2??2013-03-13?14:55??obj\x86\Debug\ResGen.read.1.tlog

?????文件??????????2??2013-03-13?14:55??obj\x86\Debug\ResGen.write.1.tlog

?????文件???????8605??2013-03-13?14:55??obj\x86\Debug\ResolveAssemblyReference.cache

?????文件???????4608??2019-10-21?15:17??obj\x86\Debug\TempPE\Properties.Resources.Designer.cs.dll

?????文件???????1370??2012-05-31?17:12??Properties\AssemblyInfo.cs

?????文件???????2854??2019-10-21?13:20??Properties\Resources.Designer.cs

?????文件???????5612??2012-05-31?17:14??Properties\Resources.resx

?????文件???????1107??2019-10-21?13:20??Properties\Settings.Designer.cs

?????文件????????249??2012-05-31?17:12??Properties\Settings.settings

?????文件????????146??2013-02-22?00:57??實例圖片\1.png

?????文件????????164??2013-02-22?00:58??實例圖片\2.png

?????文件????????274??2013-02-22?01:31??實例圖片\3.png

?????文件????????142??2013-02-22?01:25??實例圖片\4.png

?????文件????????159??2013-02-22?01:25??實例圖片\5.png

?????文件????????165??2013-02-20?01:00??實例圖片\6.png

?????文件????????117??2019-10-21?13:20??app.config

?????文件???????3307??2019-10-21?11:06??Form1.cs

?????文件???????5443??2019-10-21?11:06??Form1.Designer.cs

?????文件???????5817??2019-10-21?11:06??Form1.resx

............此處省略33個文件信息

評論

共有 條評論