基于C实现Winform界面调用名片识别接口

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

基于C#实现Winform界面调用名片识别接口本程序适用于聚合名片识别接口:注:项目中如遇无法引用System.Web.dll问题,修改“项目属性”-“应用程序”-“目标框架”,由“.NETFramework4ClientProfile”修改为“.NETFramework4”。然后再引用.NET4.0的System.Web.dll即可前台界面代码:namespacemingpianshibie{partialclassForm1{///summary///Requireddesignervariable.////summaryprivateSystem.ComponentModel.IContainercomponents=null;///summary///Cleanupanyresourcesbeingused.////summary///paramname=disposingtrueifmanagedresourcesshouldbedisposed;otherwise,false.protectedoverridevoidDispose(booldisposing){if(disposing&&(components!=null)){components.Dispose();}base.Dispose(disposing);}#regionWindowsFormDesignergeneratedcode///summary///RequiredmethodforDesignersupport-donotmodify///thecontentsofthismethodwiththecodeeditor.////summaryprivatevoidInitializeComponent(){this.open=newSystem.Windows.Forms.Button();this.pixel=newSystem.Windows.Forms.Button();this.pictureBox2=newSystem.Windows.Forms.PictureBox();this.pictureBox1=newSystem.Windows.Forms.PictureBox();this.ImgToBase64=newSystem.Windows.Forms.Button();this.button2=newSystem.Windows.Forms.Button();this.groupBox1=newSystem.Windows.Forms.GroupBox();this.label1=newSystem.Windows.Forms.Label();this.lb_show=newSystem.Windows.Forms.Label();((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();this.groupBox1.SuspendLayout();this.SuspendLayout();////open//this.open.Location=newSystem.Drawing.Point(414,29);this.open.Name=open;this.open.Size=newSystem.Drawing.Size(112,29);this.open.TabIndex=0;this.open.Text=选择图片;this.open.UseVisualStyleBackColor=true;this.open.Click+=newSystem.EventHandler(this.open_Click);////pixel//this.pixel.Location=newSystem.Drawing.Point(414,92);this.pixel.Name=pixel;this.pixel.Size=newSystem.Drawing.Size(112,29);this.pixel.TabIndex=3;this.pixel.Text=灰度化处理;this.pixel.UseVisualStyleBackColor=true;this.pixel.Click+=newSystem.EventHandler(this.pixel_Click);////pictureBox2//this.pictureBox2.Location=newSystem.Drawing.Point(6,141);this.pictureBox2.Name=pictureBox2;this.pictureBox2.Size=newSystem.Drawing.Size(373,113);this.pictureBox2.TabIndex=5;this.pictureBox2.TabStop=false;////pictureBox1//this.pictureBox1.Location=newSystem.Drawing.Point(6,17);this.pictureBox1.Name=pictureBox1;this.pictureBox1.Size=newSystem.Drawing.Size(373,110);this.pictureBox1.TabIndex=4;this.pictureBox1.TabStop=false;////ImgToBase64//this.ImgToBase64.Location=newSystem.Drawing.Point(414,153);this.ImgToBase64.Name=ImgToBase64;this.ImgToBase64.Size=newSystem.Drawing.Size(112,29);this.ImgToBase64.TabIndex=6;this.ImgToBase64.Text=图片Base64转换;this.ImgToBase64.UseVisualStyleBackColor=true;this.ImgToBase64.Click+=newSystem.EventHandler(this.ImgToBase64_Click);////button2//this.button2.Location=newSystem.Drawing.Point(414,216);this.button2.Name=button2;this.button2.Size=newSystem.Drawing.Size(112,29);this.button2.TabIndex=7;this.button2.Text=名片识别;this.button2.UseVisualStyleBackColor=true;this.button2.Click+=newSystem.EventHandler(this.button2_Click_1);////groupBox1//this.groupBox1.BackColor=System.Drawing.SystemColors.Control;this.groupBox1.Controls.Add(this.pictureBox1);this.groupBox1.Controls.Add(this.pictureBox2);this.groupBox1.Location=newSystem.Drawing.Point(12,12);this.groupBox1.Name=groupBox1;this.groupBox1.Size=newSystem.Drawing.Size(396,260);this.groupBox1.TabIndex=8;this.groupBox1.TabStop=false;this.groupBox1.Text=图片展示;////label1//this.label1.AutoSize=true;this.label1.Location=newSystem.Drawing.Point(16,299);this.label1.Name=label1;this.label1.Size=newSystem.Drawing.Size(65,12);this.label1.TabIndex=9;this.label1.Text=识别结果:;////lb_show//this.lb_show.AutoSize=true;this.lb_show.Location=newSystem.Drawing.Point(106,299);this.lb_show.Name=lb_show;this.lb_show.Size=newSystem.Drawing.Size(0,12);this.lb_show.TabIndex=10;////Form1//this.AutoScaleDimensions=newSystem.Drawing.SizeF(6F,12F);this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Font;this.ClientSize=newSystem.Drawing.Size(553,348);this.Controls.Add(this.lb_show);this.Controls.Add(this.label1);this.Controls.Add(this.groupBox1);this.Controls.Add(this.button2);this.Controls.Add(this.ImgToBase64);this.Controls.Add(this.pixel);this.Controls.Add(this.open);this.FormBorderStyle=System.Windows.Forms.FormBorderStyle.FixedToolWindow;this.Name=Form1;this.Text=名片识别;((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();this.groupBox1.ResumeLayout(false);this.ResumeLayout(false);this.PerformLayout();}#endregionprivateSystem.Windows.Forms.Buttonopen;privateSystem.Windows.Forms.Buttonpixel;privateSystem.Windows.Forms.PictureBoxpictureBox2;privateSystem.Windows.Forms.PictureBoxpictureBox1;privateSystem.Windows.Forms.ButtonImgToBase64;privateSystem.Windows.Forms.Buttonbutton2;privateSystem.Windows.Forms.GroupBoxgroupBox1;privateSystem.Windows.Forms.Labellabel1;privateSystem.Windows.Forms.Labellb_show;}}/paramname=dispos

1 / 13
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功