16,555
社区成员
发帖
与我相关
我的任务
分享
private void FormMain_Load(object sender, System.EventArgs e)
{
Image userDrawAreaImage = userDrawAreaBmp = new Bitmap(200,200,System.Drawing.Imaging.PixelFormat.Format24bppRgb);
Image userTemplateAreaImage = userTemplateAreaBmp = new Bitmap(200,200,System.Drawing.Imaging.PixelFormat.Format24bppRgb);
this.userDrawArea.Image = userDrawAreaImage;
this.userTemplateArea.Image = userTemplateAreaImage;
//PointSize = new Size(10,10);
arrCurrentEigenvalue = new ArrayList(this.SplitWidth * this.SplitHeight);
resultList = new ArrayList();
DbConn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" + Application.ExecutablePath.Substring(0,Application.ExecutablePath.LastIndexOf("\\")) + @"\Learn.mdb;");
DbCmd = new OleDbCommand();
try
{
DbConn.Open();
DbCmd.Connection = this.DbConn;
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
Application.Exit();
}
}
private void userDrawArea_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.currentlyDrawing = false;
this.GraspRawData();
}
private void buttonRecognise_Click(object sender, System.EventArgs e)
{
//识º?别Àe
DbCmd.CommandText = "select AutoId,LearnCharacter,Eigenvalue,Frequency from tbLearn order by Frequency";
OleDbDataReader ddr = DbCmd.ExecuteReader();
int maxMatch = 0;
progressRecognition.Value = 0;
progressRecognition.Maximum = ddr.GetSchemaTable().Rows.Count;
progressRecognition.Minimum = 0;
resultList.Clear();
resultList.TrimToSize();
while(ddr.Read())
{
//比À¨¨较?
if(!ddr.IsDBNull(2))
maxMatch = Match(ddr.GetString(2));
//MessageBox.Show (maxMatch.ToString());
//保À¡ê留¢?匹£¤配?率¨º字Á?符¤?的Ì?精?度¨¨,建¡§议°¨¦10%
if(maxMatch>=precisionTrackBar.Value)
{
Suited suited = new Suited(ddr.GetString(1),maxMatch,ddr.GetFloat(3));
resultList.Add(suited);
}
//找¨°出?匹£¤配?率¨º最Á?高?的Ì?
resultList.Sort(0,resultList.Count,new MaxMatchSort());
if(progressRecognition.Value<progressRecognition.Maximum)
progressRecognition.Value += 1;
}
ddr.Close();
//分¤?离¤?结¨¢果?
//找¨°出?频¦Ì率¨º最Á?高?的Ì?字Á?符¤?
resultList.Sort(0,resultList.Count,new MaxUseCountSort());
//保À¡ê存ä?匹£¤配?率¨º最Á?高?的Ì?10个?字Á?符¤?
while(resultList.Count>10)
{
resultList.RemoveAt(resultList.Count-1);
}
//找¨°出?匹£¤配?率¨º最Á?高?的Ì?
resultList.Sort(0,resultList.Count,new MaxMatchSort());
ResultList.Items.Clear();
foreach(Suited s in resultList)
{
ResultList.Items.Add(s.Character);
}
resultList.Clear();
resultList.TrimToSize();
progressRecognition.Value = progressRecognition.Maximum;
}
private int Match(string Eigenvalue)
{
int maxMatch = 0;
string c = "";
string e = "";
int d = 0;
if(Eigenvalue.Length<(this.SplitWidth * this.SplitHeight))
return 0;
for(int i=0;i<this.SplitWidth;i++)
{
for(int j=0;j<this.SplitHeight;j++)
{
if(d>=this.arrCurrentEigenvalue.Count)
return maxMatch;
c = Eigenvalue.Substring(d,1);
e = (string)this.arrCurrentEigenvalue[d];
if(c=="1")
{
if(e=="1")
maxMatch ++;
else
maxMatch --;
}
else
{
if(e=="0")
maxMatch ++;
else
maxMatch --;
}
d++;
}
}
return maxMatch;
}
private void ResultList_DoubleClick(object sender, System.EventArgs e)
{
string LearnCharacter = (string)ResultList.SelectedItem + "";
if(LearnCharacter!="")
{
DbCmd.CommandText = string.Format("update tbLearn set Frequency=Frequency + 0.01 where LearnCharacter = '{0}'",LearnCharacter.Replace("'","''"));
DbCmd.ExecuteNonQuery();
MessageBox.Show(LearnCharacter);
}
}
private void AutoLearn_Click(object sender, System.EventArgs e)
{
if(openFileDialog1.ShowDialog(this)==DialogResult.OK)
{
//开a始º?分¤?析?
System.IO.StreamReader sr = new System.IO.StreamReader(openFileDialog1.FileName,System.Text.Encoding.Default);
string allText = sr.ReadToEnd();
string c = "";
sr.Close();
allText = allText.Replace(" ","");
allText = allText.Replace("\r","");
allText = allText.Replace("\n","");
allText = allText.Replace("\t","");
Bitmap memBmp = new Bitmap(this.userDrawAreaBmp.Width,this.userDrawAreaBmp.Height,System.Drawing.Imaging.PixelFormat.Format16bppRgb555);
Graphics memGp = Graphics.FromImage(memBmp);
Graphics uGp = Graphics.FromImage(userDrawAreaBmp);
progressRecognition.Value = 0;
progressRecognition.Minimum = 0;
progressRecognition.Maximum = allText.Length-1;
btnBreak.Tag = 0;
for(int i=0;i<allText.Length;i++)
{
c = allText.Substring(i,1);
memGp.FillRectangle(new SolidBrush(Color.Black),0,0,memBmp.Width,memBmp.Height);
memGp.DrawString(c,new Font("楷?体¬?_GB2312",100f,FontStyle.Bold),new SolidBrush(Color.White),0,0);
uGp.FillRectangle(new SolidBrush(Color.Black),0,0,userDrawAreaBmp.Width,userDrawAreaBmp.Height);
uGp.DrawImage(memBmp,new Rectangle(0,0,userDrawAreaBmp.Width,userDrawAreaBmp.Height),0,0,memBmp.Width,memBmp.Height,System.Drawing.GraphicsUnit.Pixel);
//分¤?析?特¬?征¡Â码?
GraspRawData();
//保À¡ê存ä?特¬?征¡Â码?
SaveLearn(c);
textResult.Text = "正y在¨²自Á?学¡ì习¡ã:" + c;
try
{
textResult.Refresh();
}
catch{;}
if(progressRecognition.Value<progressRecognition.Maximum)
progressRecognition.Value += 1;
if((int)btnBreak.Tag==1)
break;
Application.DoEvents();
}
uGp.Dispose();
memGp.Dispose();
memBmp.Dispose();
MessageBox.Show("自Á?学¡ì习¡ã完ª¨º毕À?!");
}
}
private void btnBreak_Click(object sender, System.EventArgs e)
{
btnBreak.Tag = 1;
}
}
public class MaxMatchSort : IComparer
{
int IComparer.Compare( Object x, Object y )
{
Suited sx = (Suited)x;
Suited sy = (Suited)y;
CaseInsensitiveComparer cic = new CaseInsensitiveComparer();
return cic.Compare(sy.MaxMatch , sx.MaxMatch);
}
}
public class MaxUseCountSort : IComparer
{
int IComparer.Compare( Object x, Object y )
{
Suited sx = (Suited)x;
Suited sy = (Suited)y;
CaseInsensitiveComparer cic = new CaseInsensitiveComparer();
return cic.Compare(sy.MaxUseCount , sx.MaxUseCount);
}
}
}
/// <summary>
/// 应®|用®?程¨¬序¨°的Ì?主¡Â入¨?口¨²点Ì?。¡ê
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new FormMain());
}
private void ClearGraphics(Image img,Color clearColor)
{
if(img!=null)
{
Graphics g = Graphics.FromImage(img);
g.FillRectangle(new SolidBrush(clearColor),0,0,img.Width,img.Height);
g.Dispose();
}
userDrawArea.Refresh();
userTemplateArea.Refresh();
}
private void buttonLearnCancel_Click(object sender, System.EventArgs e)
{
this.inputLearnCharacter.Text = "";
}
private void buttonClearScreen_Click(object sender, System.EventArgs e)
{
arrCurrentEigenvalue.Clear();
arrCurrentEigenvalue.TrimToSize();
this.textResult.Text = "";
this.progressRecognition.Value = 0;
ClearGraphics(userDrawArea.Image,Color.Black);
ClearGraphics(userTemplateArea.Image,Color.Black);
}
private void GraspRawData()
{
bool bool1stScan=true ;
int ax,ay,bx,by;
this.ClearGraphics(this.userTemplateArea.Image,Color.Black);
ax = ay = bx = by = 0;
Graphics g = Graphics.FromImage(userTemplateAreaBmp);
int b = 0;
for(int i=0;i<userDrawAreaBmp.Width;i+=(userDrawAreaBmp.Width/this.SplitWidth) / 2)
for(int j=0;j<userDrawAreaBmp.Height;j+=(userDrawAreaBmp.Height/this.SplitHeight) / 2)
{
if(userDrawAreaBmp.GetPixel(i,j).ToArgb()==Color.White.ToArgb())
{
if(!bool1stScan)
{
if(i<ax) ax = i;
if(i>=bx) bx = i;
if(j<ay) ay = j;
if(j>=by) by = j;
}
else
{
bool1stScan = false;
ax = i;
bx = i;
ay = j;
by = j;
}
}
b ++;
}
this.arrCurrentEigenvalue.Clear();
this.arrCurrentEigenvalue.TrimToSize();
if((bx-ax)!=0 && (by-ay)!=0 && (((bx-ax)>(userDrawAreaBmp.Width/this.SplitWidth)/2) || ((by-ay)>(userDrawAreaBmp.Height/this.SplitHeight)/2)))
{
this.ClearGraphics(this.userTemplateArea.Image,Color.Black);
Bitmap memBmp = new Bitmap(userTemplateAreaBmp.Width,userTemplateAreaBmp.Height,System.Drawing.Imaging.PixelFormat.Format16bppRgb555);
Graphics memGp = Graphics.FromImage(memBmp);
memGp.DrawImage(userDrawAreaBmp,new Rectangle(0,0,memBmp.Width-1,memBmp.Height-1),ax,ay,bx-ax,by-ay,GraphicsUnit.Pixel);
int pw = (userDrawAreaBmp.Width/this.SplitWidth) ;
int ph = (userDrawAreaBmp.Height/this.SplitHeight);
for(int i=0;i<memBmp.Width;i+=(memBmp.Width/this.SplitWidth))
for(int j=0;j<memBmp.Height;j+=(memBmp.Height/this.SplitHeight))
{
if(memBmp.GetPixel(i,j).ToArgb()==Color.White.ToArgb())
{
g.FillRectangle(new SolidBrush(Color.Red),i-(pw /2),j-(ph /2),pw,ph);
g.DrawRectangle(new Pen(Color.Yellow,1f),i-(pw /2),j-(ph /2),pw,ph);
arrCurrentEigenvalue.Add("1");
}
else
{
arrCurrentEigenvalue.Add("0");
}
}
memGp.Dispose();
memBmp.Dispose();
}
//textResult.Text = this.arrCurrentEigenvalue.Count.ToString();
g.Dispose();
userTemplateArea.Refresh();
}
/// <summary>
/// 保À¡ê存ä?学¡ì习¡ã结¨¢果?
/// </summary>
private void SaveLearn(string LearnCharacter)
{
if(arrCurrentEigenvalue.Count<=0)
{
return;
}
//建¡§立¢¡é特¬?征¡Â码?
string Eigenvalue = "";
foreach(string ce in this.arrCurrentEigenvalue)
Eigenvalue += ce;
try
{
DbCmd.CommandText = string.Format("select Count(*) as exp1 from tbLearn where LearnCharacter = '{0}'",LearnCharacter.Replace("'","''"));
OleDbDataReader ddr = DbCmd.ExecuteReader();
bool isUpdate = false;
while(ddr.Read())
{
if(ddr.GetInt32(0)!=0)
{
//更¨¹新?
isUpdate = true;
}
}
ddr.Close();
if(isUpdate)
DbCmd.CommandText = string.Format("update tbLearn set Eigenvalue='{0}' where LearnCharacter = '{1}'",Eigenvalue,LearnCharacter.Replace("'","''"));
else
DbCmd.CommandText = string.Format("insert into tbLearn (LearnCharacter,Eigenvalue,Frequency)values('{0}','{1}',0)",LearnCharacter.Replace("'","''"),Eigenvalue);
DbCmd.ExecuteNonQuery();
}
catch(Exception ex)
{
this.strCaption = ex.Message;
}
finally
{
this.textResult.Text = strCaption;
}
}
private void buttonLearnConfirm_Click(object sender, System.EventArgs e)
{
if(this.inputLearnCharacter.Text.Length==0)
return;
SaveLearn(this.inputLearnCharacter.Text);
}
private void userDrawArea_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.currentlyDrawing = true;
userDrawArea_MouseMove(sender,e);
}
private void userDrawArea_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(this.currentlyDrawing)
{
Graphics g = Graphics.FromImage(userDrawAreaBmp);
g.FillPie(new SolidBrush(Color.White),e.X-(PointSize.Width/2),e.Y-(PointSize.Height/2),PointSize.Width,PointSize.Height,0f,360f);
g.Dispose();
userDrawArea.Refresh();
}
}
// frameArea3
//
this.frameArea3.Controls.Add(this.btnBreak);
this.frameArea3.Controls.Add(this.AutoLearn);
this.frameArea3.Controls.Add(this.userTemplateArea);
this.frameArea3.Location = new System.Drawing.Point(232, 8);
this.frameArea3.Name = "frameArea3";
this.frameArea3.Size = new System.Drawing.Size(216, 264);
this.frameArea3.TabIndex = 14;
this.frameArea3.TabStop = false;
this.frameArea3.Text = "区?域®¨°分¤?析?";
//
// AutoLearn
//
this.AutoLearn.Location = new System.Drawing.Point(8, 232);
this.AutoLearn.Name = "AutoLearn";
this.AutoLearn.Size = new System.Drawing.Size(96, 23);
this.AutoLearn.TabIndex = 4;
this.AutoLearn.Text = "自Á?动¡¥学¡ì习¡ã";
this.AutoLearn.Visible = false;
this.AutoLearn.Click += new System.EventHandler(this.AutoLearn_Click);
//
// userTemplateArea
//
this.userTemplateArea.BackColor = System.Drawing.Color.Black;
this.userTemplateArea.Location = new System.Drawing.Point(8, 24);
this.userTemplateArea.Name = "userTemplateArea";
this.userTemplateArea.Size = new System.Drawing.Size(200, 200);
this.userTemplateArea.TabIndex = 3;
this.userTemplateArea.TabStop = false;
//
// ResultList
//
this.ResultList.ColumnWidth = 20;
this.ResultList.HorizontalScrollbar = true;
this.ResultList.ItemHeight = 12;
this.ResultList.Location = new System.Drawing.Point(240, 280);
this.ResultList.MultiColumn = true;
this.ResultList.Name = "ResultList";
this.ResultList.Size = new System.Drawing.Size(200, 16);
this.ResultList.TabIndex = 15;
this.ResultList.DoubleClick += new System.EventHandler(this.ResultList_DoubleClick);
//
// progressRecognition
//
this.progressRecognition.Location = new System.Drawing.Point(240, 304);
this.progressRecognition.Name = "progressRecognition";
this.progressRecognition.Size = new System.Drawing.Size(200, 23);
this.progressRecognition.TabIndex = 16;
//
// progressText
//
this.progressText.AutoSize = true;
this.progressText.Location = new System.Drawing.Point(176, 312);
this.progressText.Name = "progressText";
this.progressText.Size = new System.Drawing.Size(60, 17);
this.progressText.TabIndex = 17;
this.progressText.Text = "处ä|理¤¨ª进?度¨¨:";
//
// resultText
//
this.resultText.AutoSize = true;
this.resultText.Location = new System.Drawing.Point(176, 280);
this.resultText.Name = "resultText";
this.resultText.Size = new System.Drawing.Size(60, 17);
this.resultText.TabIndex = 18;
this.resultText.Text = "可¨¦选?文?字Á?:";
//
// precisionTrackBar
//
this.precisionTrackBar.Location = new System.Drawing.Point(240, 336);
this.precisionTrackBar.Maximum = 50;
this.precisionTrackBar.Minimum = 1;
this.precisionTrackBar.Name = "precisionTrackBar";
this.precisionTrackBar.TabIndex = 100;
this.precisionTrackBar.Value = 10;
//
// precisionText
//
this.precisionText.AutoSize = true;
this.precisionText.Location = new System.Drawing.Point(176, 344);
this.precisionText.Name = "precisionText";
this.precisionText.Size = new System.Drawing.Size(60, 17);
this.precisionText.TabIndex = 20;
this.precisionText.Text = "识º?别Àe精?度¨¨:";
//
// openFileDialog1
//
this.openFileDialog1.Filter = "文?本À?文?件t|*.txt";
this.openFileDialog1.Title = "请?选?择?源¡ä文?件t!用®?于®¨²学¡ì习¡ã!";
//
// btnBreak
//
this.btnBreak.Location = new System.Drawing.Point(112, 232);
this.btnBreak.Name = "btnBreak";
this.btnBreak.Size = new System.Drawing.Size(96, 23);
this.btnBreak.TabIndex = 5;
this.btnBreak.Text = "中D断?学¡ì习¡ã";
this.btnBreak.Visible = false;
this.btnBreak.Click += new System.EventHandler(this.btnBreak_Click);
//
// FormMain
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(456, 373);
this.Controls.Add(this.precisionText);
this.Controls.Add(this.precisionTrackBar);
this.Controls.Add(this.resultText);
this.Controls.Add(this.progressText);
this.Controls.Add(this.progressRecognition);
this.Controls.Add(this.ResultList);
this.Controls.Add(this.frameArea3);
this.Controls.Add(this.frameArea1);
this.Controls.Add(this.textResult);
this.Controls.Add(this.buttonLearnCancel);
this.Controls.Add(this.buttonLearnConfirm);
this.Controls.Add(this.inputLearnCharacter);
this.Controls.Add(this.TeachLabelText);
this.Name = "FormMain";
this.Text = "OCR 文?字Á?识º?别Àe";
this.Load += new System.EventHandler(this.FormMain_Load);
this.frameArea1.ResumeLayout(false);
this.frameArea3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.precisionTrackBar)).EndInit();
this.ResumeLayout(false);
}
#endregion
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
namespace OCR
{
struct Suited
{
public string Character; //字Á?符¤?名?
public int MaxMatch; //匹£¤配?率¨º
public float MaxUseCount; //使º1用®?频¦Ì率¨º
public Suited(string Character,int MaxMatch,float MaxUseCount)
{
this.Character = Character;
this.MaxMatch = MaxMatch;
this.MaxUseCount = MaxUseCount;
}
}
/// <summary>
/// OCR 的Ì?摘a要°a说¦Ì明¡Â。¡ê
/// </summary>
public class FormMain : System.Windows.Forms.Form
{
private System.Windows.Forms.Label TeachLabelText;
private System.Windows.Forms.TextBox inputLearnCharacter;
private System.Windows.Forms.Button buttonLearnConfirm;
private System.Windows.Forms.Button buttonLearnCancel;
private System.Windows.Forms.Label textResult;
/// <summary>
/// 必À?需¨¨的Ì?设¦¨¨计?器¡Â变À?量¢?。¡ê
/// </summary>
private System.ComponentModel.Container components = null;
string strCaption = "";
bool currentlyDrawing = false;
Bitmap userDrawAreaBmp;
Bitmap userTemplateAreaBmp;
ArrayList arrCurrentEigenvalue ;
ArrayList resultList ;
OleDbConnection DbConn ;
OleDbCommand DbCmd ;
public int SplitWidth = 20;
public int SplitHeight = 20;
public Size PointSize = new Size(10,10);
private System.Windows.Forms.GroupBox frameArea1;
private System.Windows.Forms.GroupBox frameArea3;
private System.Windows.Forms.PictureBox userDrawArea;
private System.Windows.Forms.Button buttonRecognise;
private System.Windows.Forms.Button buttonClearScreen;
private System.Windows.Forms.PictureBox userTemplateArea;
private System.Windows.Forms.ListBox ResultList;
private System.Windows.Forms.ProgressBar progressRecognition;
private System.Windows.Forms.Label progressText;
private System.Windows.Forms.Label resultText;
private System.Windows.Forms.TrackBar precisionTrackBar;
private System.Windows.Forms.Button AutoLearn;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Button btnBreak;
private System.Windows.Forms.Label precisionText;
public FormMain()
{
//
// Windows 窗ä¡ã体¬?设¦¨¨计?器¡Â支¡ì持?所¨´必À?需¨¨的Ì?
//
InitializeComponent();
//
// TODO: 在¨² InitializeComponent 调Ì¡Â用®?后¨®添¬¨ª加¨®任¨?何?构1造¨¬函¡¥数ºy代䨲码?
//
}
/// <summary>
/// 清?理¤¨ª所¨´有®D正y在¨²使º1用®?的Ì?资Á¨º源¡ä。¡ê
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗ä¡ã体¬?设¦¨¨计?器¡Â生¦¨²成¨¦的Ì?代䨲码?
/// <summary>
/// 设¦¨¨计?器¡Â支¡ì持?所¨´需¨¨的Ì?方¤?法¤¡§ - 不?要°a使º1用®?代䨲码?编À¨¤辑-器¡Â修T改?
/// 此ä?方¤?法¤¡§的Ì?内¨²容¨Y。¡ê
/// </summary>
private void InitializeComponent()
{
this.TeachLabelText = new System.Windows.Forms.Label();
this.inputLearnCharacter = new System.Windows.Forms.TextBox();
this.buttonLearnConfirm = new System.Windows.Forms.Button();
this.buttonLearnCancel = new System.Windows.Forms.Button();
this.textResult = new System.Windows.Forms.Label();
this.frameArea1 = new System.Windows.Forms.GroupBox();
this.buttonRecognise = new System.Windows.Forms.Button();
this.buttonClearScreen = new System.Windows.Forms.Button();
this.userDrawArea = new System.Windows.Forms.PictureBox();
this.frameArea3 = new System.Windows.Forms.GroupBox();
this.AutoLearn = new System.Windows.Forms.Button();
this.userTemplateArea = new System.Windows.Forms.PictureBox();
this.ResultList = new System.Windows.Forms.ListBox();
this.progressRecognition = new System.Windows.Forms.ProgressBar();
this.progressText = new System.Windows.Forms.Label();
this.resultText = new System.Windows.Forms.Label();
this.precisionTrackBar = new System.Windows.Forms.TrackBar();
this.precisionText = new System.Windows.Forms.Label();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.btnBreak = new System.Windows.Forms.Button();
this.frameArea1.SuspendLayout();
this.frameArea3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.precisionTrackBar)).BeginInit();
this.SuspendLayout();
//
// TeachLabelText
//
this.TeachLabelText.AutoSize = true;
this.TeachLabelText.Location = new System.Drawing.Point(8, 280);
this.TeachLabelText.Name = "TeachLabelText";
this.TeachLabelText.Size = new System.Drawing.Size(110, 17);
this.TeachLabelText.TabIndex = 7;
this.TeachLabelText.Text = "请?输º?入¨?学¡ì习¡ã的Ì?字Á?符¤?:";
//
// inputLearnCharacter
//
this.inputLearnCharacter.Location = new System.Drawing.Point(8, 304);
this.inputLearnCharacter.MaxLength = 1;
this.inputLearnCharacter.Name = "inputLearnCharacter";
this.inputLearnCharacter.Size = new System.Drawing.Size(24, 21);
this.inputLearnCharacter.TabIndex = 8;
this.inputLearnCharacter.Text = "";
//
// buttonLearnConfirm
//
this.buttonLearnConfirm.Location = new System.Drawing.Point(40, 304);
this.buttonLearnConfirm.Name = "buttonLearnConfirm";
this.buttonLearnConfirm.Size = new System.Drawing.Size(40, 23);
this.buttonLearnConfirm.TabIndex = 9;
this.buttonLearnConfirm.Text = "确¨¡¤认¨?";
this.buttonLearnConfirm.Click += new System.EventHandler(this.buttonLearnConfirm_Click);
//
// buttonLearnCancel
//
this.buttonLearnCancel.Location = new System.Drawing.Point(80, 304);
this.buttonLearnCancel.Name = "buttonLearnCancel";
this.buttonLearnCancel.Size = new System.Drawing.Size(40, 23);
this.buttonLearnCancel.TabIndex = 10;
this.buttonLearnCancel.Text = "取¨?消?";
this.buttonLearnCancel.Click += new System.EventHandler(this.buttonLearnCancel_Click);
//
// textResult
//
this.textResult.AutoSize = true;
this.textResult.Location = new System.Drawing.Point(8, 344);
this.textResult.Name = "textResult";
this.textResult.Size = new System.Drawing.Size(97, 17);
this.textResult.TabIndex = 11;
this.textResult.Text = "字Á?符¤?识º?别Àe状Á¡ä态¬?...";
//
// frameArea1
//
this.frameArea1.Controls.Add(this.buttonRecognise);
this.frameArea1.Controls.Add(this.buttonClearScreen);
this.frameArea1.Controls.Add(this.userDrawArea);
this.frameArea1.Location = new System.Drawing.Point(8, 8);
this.frameArea1.Name = "frameArea1";
this.frameArea1.Size = new System.Drawing.Size(216, 264);
this.frameArea1.TabIndex = 12;
this.frameArea1.TabStop = false;
this.frameArea1.Text = "用®?户¡ì绘?制?区?域®¨°";
//
// buttonRecognise
//
this.buttonRecognise.Location = new System.Drawing.Point(112, 232);
this.buttonRecognise.Name = "buttonRecognise";
this.buttonRecognise.TabIndex = 6;
this.buttonRecognise.Text = "识º?别Àe";
this.buttonRecognise.Click += new System.EventHandler(this.buttonRecognise_Click);
//
// buttonClearScreen
//
this.buttonClearScreen.Location = new System.Drawing.Point(32, 232);
this.buttonClearScreen.Name = "buttonClearScreen";
this.buttonClearScreen.TabIndex = 5;
this.buttonClearScreen.Text = "清?除y";
this.buttonClearScreen.Click += new System.EventHandler(this.buttonClearScreen_Click);
//
// userDrawArea
//
this.userDrawArea.BackColor = System.Drawing.Color.Black;
this.userDrawArea.Location = new System.Drawing.Point(8, 24);
this.userDrawArea.Name = "userDrawArea";
this.userDrawArea.Size = new System.Drawing.Size(200, 200);
this.userDrawArea.TabIndex = 1;
this.userDrawArea.TabStop = false;
this.userDrawArea.MouseUp += new System.Windows.Forms.MouseEventHandler(this.userDrawArea_MouseUp);
this.userDrawArea.MouseMove += new System.Windows.Forms.MouseEventHandler(this.userDrawArea_MouseMove);
this.userDrawArea.MouseDown += new System.Windows.Forms.MouseEventHandler(this.userDrawArea_MouseDown);
//