当前位置: 首页 > news >正文

合肥做网站公司有哪些网站开发验证码功能

合肥做网站公司有哪些,网站开发验证码功能,做机械设备网站,网站备案 强制百度OCR身份证识别C离线SDKV3.0 C#对接 目录 说明 效果 问题 项目 代码 下载 说明 自己根据SDK封装了动态库#xff0c;然后C#调用。 SDK 简介 本 SDK 适应于于 Windows 平台下的⾝份证识别系统,⽀持 C接⼜开发的 SDK,开发者可在VS2015 下⾯进⾏开发#xff08;推荐… 百度OCR身份证识别C离线SDKV3.0 C#对接 目录 说明 效果 问题  项目 代码 下载 说明 自己根据SDK封装了动态库然后C#调用。 SDK 简介 本 SDK 适应于于 Windows 平台下的⾝份证识别系统,⽀持 C接⼜开发的 SDK,开发者可在VS2015 下⾯进⾏开发推荐使⽤不保证其他版本 VS 都兼容。SDK 采⽤ C的动态库 DLL 的⽅式另外随 SDK 附带⼀个鉴权激活⼯具LicenseTool.exe在license_tool ⽬录通过该激活⼯具可⽣成正常接 ⼊SDK 的激活 license ⽂件 license.zip(解压后可⽣成两个⽂件 license.ini 和license.key)达到通过鉴权 正常使⽤SDK 的⽬的。 激活工具授权 鉴权采⽤ SDK 附带的鉴权⼯具 LicenseTool.exe、双击打开 exe 后输⼊申请获取到的授权序列号执⾏按钮激活后会⽣成⼀个 license.zip ⽂件把这个⽂件解压后会⽣成 license.ini 和 license.key两个⽂件把这 2 个⽂件放置到 SDK 的 license ⽂件夹即可通过授权激活。另外⽀持鉴权⽂件路径定制化及模型⽂件路径定制化,可参考 SDK 示例鉴权⽂件 license.key 和 license.ini 的路径可参考SDK 代码示例也可以⽤ SDK 现成的默认路径。鉴权⼯具 LicenseTool.exe 如下所示在⼯具中输⼊申请得到的 license 系列号即可⽣成鉴权 zip ⽂件。解压 zip 后可⽣成 license.ini 和 license.key 两个⽂件。 SDK包结构 效果 问题  返回的坐标位置有问题猜测可能是内部缩放了图片导致后续等官方修复。 项目 代码 using Newtonsoft.Json; using OpenCvSharp; using System; using System.Diagnostics; using System.Drawing; using System.IO; using System.Text; using System.Windows.Forms; using WinFormTest.Common;namespace WinFormTest {public partial class Form1 : Form{public Form1(){InitializeComponent();}IntPtr IDCard;int res -1;private void Form1_Load(object sender, EventArgs e){IDCard Native.create();string key ;string licenseKeyPath Application.StartupPath \\license\\license.key;string licenseFile Application.StartupPath \\license\\license.ini;key File.ReadAllText(licenseKeyPath);res Native.auth_from_file(IDCard, key, licenseFile, false);string model_folder Application.StartupPath \\resource;res Native.sdk_init(IDCard, model_folder);image_path Application.StartupPath \\idcard_.jpg;pictureBox1.Image new Bitmap(image_path);}private void button1_Click(object sender, EventArgs e){if (image_path ){return;}textBox1.Text ;Application.DoEvents();Mat image new Mat(image_path);StringBuilder ocr_result1 new StringBuilder(1024);StringBuilder ocr_result2 new StringBuilder(2048);Stopwatch stopwatch new Stopwatch();stopwatch.Start();res Native.ocr2(IDCard, image.CvPtr, ocr_result1, ocr_result2);string s ocr_result1.ToString();string s2 ocr_result2.ToString();stopwatch.Stop();double totalTime stopwatch.Elapsed.TotalSeconds;textBox1.Text $耗时: {totalTime:F2}s;textBox1.Text \r\n-------------------\r\n;if (res 0){Object jsonObject JsonConvert.DeserializeObject(ocr_result1.ToString());textBox1.Text JsonConvert.SerializeObject(jsonObject, Newtonsoft.Json.Formatting.Indented);textBox1.Text \r\n-------------------\r\n;Object jsonObject2 JsonConvert.DeserializeObject(ocr_result2.ToString());textBox1.Text JsonConvert.SerializeObject(jsonObject2, Newtonsoft.Json.Formatting.Indented);IDCardRes iDCardResponse JsonConvert.DeserializeObjectIDCardRes(ocr_result1.ToString());IDCardCoordRes iDCardCoordResponse JsonConvert.DeserializeObjectIDCardCoordRes(ocr_result2.ToString());//if (iDCardResponse.name ) iDCardCoordResponse.name_coord ;//if (iDCardResponse.gender ) iDCardCoordResponse.gender_coord ;//if (iDCardResponse.ethnicity ) iDCardCoordResponse.ethnicity_coord ;//if (iDCardResponse.birth ) iDCardCoordResponse.birth_coord ;//if (iDCardResponse.address ) iDCardCoordResponse.address_coord ;//if (iDCardResponse.id_number ) iDCardCoordResponse.id_number_coord ;//if (iDCardResponse.authority ) iDCardCoordResponse.authority_coord ;//if (iDCardResponse.issuing_date ) iDCardCoordResponse.issuing_date_coord ;//if (iDCardResponse.expiry_date ) iDCardCoordResponse.expiry_date_coord ;if (iDCardResponse.name ! ){DrawRes(image, iDCardCoordResponse.name_coord);}if (iDCardResponse.gender ! ){DrawRes(image, iDCardCoordResponse.gender_coord);}if (iDCardResponse.ethnicity ! ){DrawRes(image, iDCardCoordResponse.ethnicity_coord);}if (iDCardResponse.birth ! ){DrawRes(image, iDCardCoordResponse.birth_coord);}if (iDCardResponse.address ! ){DrawRes(image, iDCardCoordResponse.address_coord);}if (iDCardResponse.id_number ! ){DrawRes(image, iDCardCoordResponse.id_number_coord);}if (iDCardResponse.authority ! ){DrawRes(image, iDCardCoordResponse.authority_coord);}if (iDCardResponse.issuing_date ! ){DrawRes(image, iDCardCoordResponse.issuing_date_coord);}if (iDCardResponse.expiry_date ! ){DrawRes(image, iDCardCoordResponse.expiry_date_coord);}if (pictureBox1.Image ! null){pictureBox1.Image.Dispose();pictureBox1.Image null;}pictureBox1.Image new Bitmap(image.ToMemoryStream());image.Dispose();}else{textBox1.Text 识别失败;}}void DrawRes(Mat res_image, string ptsStr){string[] pts ptsStr.Split( );//多边形的顶点OpenCvSharp.Point[] points new OpenCvSharp.Point[]{new OpenCvSharp.Point(Convert.ToDouble( pts[0]), Convert.ToDouble( pts[1])),new OpenCvSharp.Point(Convert.ToDouble( pts[2]), Convert.ToDouble( pts[3])),new OpenCvSharp.Point(Convert.ToDouble( pts[4]), Convert.ToDouble( pts[5])),new OpenCvSharp.Point(Convert.ToDouble( pts[6]), Convert.ToDouble( pts[7])),};// 绘制多边形Cv2.Polylines(res_image, new OpenCvSharp.Point[][] { points }, isClosed: true, color: new Scalar(0, 255, 0), thickness: 3);}void DrawRes2(Mat res_image, float[] pts){//多边形的顶点OpenCvSharp.Point[] points new OpenCvSharp.Point[]{new OpenCvSharp.Point(pts[0], pts[1]),new OpenCvSharp.Point(pts[2], pts[3]),new OpenCvSharp.Point(pts[4], pts[5]),new OpenCvSharp.Point(pts[6], pts[7]),};// 绘制多边形Cv2.Polylines(res_image, new OpenCvSharp.Point[][] { points }, isClosed: true, color: new Scalar(0, 255, 0), thickness: 3);}string fileFilter *.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png;string image_path ;private void button2_Click(object sender, EventArgs e){OpenFileDialog ofd new OpenFileDialog();ofd.Filter fileFilter;if (ofd.ShowDialog() ! DialogResult.OK) return;pictureBox1.Image null;image_path ofd.FileName;pictureBox1.Image new Bitmap(image_path);textBox1.Text ;}private void button3_Click(object sender, EventArgs e){if (image_path ){return;}textBox1.Text ;Application.DoEvents();Mat image new Mat(image_path);IDCardResponse final_result new IDCardResponse();Stopwatch stopwatch new Stopwatch();stopwatch.Start();res Native.ocr(IDCard, image.CvPtr, ref final_result);stopwatch.Stop();double totalTime stopwatch.Elapsed.TotalSeconds;textBox1.Text $耗时: {totalTime:F2}s;textBox1.Text \r\n-------------------\r\n;IDCardRes iDCardResponse new IDCardRes();iDCardResponse.name Encoding.UTF8.GetString(final_result.name).Replace(\u0000, );iDCardResponse.gender Encoding.UTF8.GetString(final_result.gender).Replace(\u0000, );iDCardResponse.ethnicity Encoding.UTF8.GetString(final_result.ethnicity).Replace(\u0000, );iDCardResponse.birth Encoding.UTF8.GetString(final_result.birth).Replace(\u0000, );iDCardResponse.address Encoding.UTF8.GetString(final_result.address).Replace(\u0000, );iDCardResponse.id_number Encoding.UTF8.GetString(final_result.id_number).Replace(\u0000, );iDCardResponse.authority Encoding.UTF8.GetString(final_result.authority).Replace(\u0000, );iDCardResponse.issuing_date Encoding.UTF8.GetString(final_result.issuing_date).Replace(\u0000, );iDCardResponse.expiry_date Encoding.UTF8.GetString(final_result.expiry_date).Replace(\u0000, );textBox1.Text JsonConvert.SerializeObject(iDCardResponse, Newtonsoft.Json.Formatting.Indented);textBox1.Text \r\n-------------------\r\n;IDCardCoordRes2 iDCardCoordRes2 new IDCardCoordRes2();iDCardCoordRes2.name_coord final_result.name_coord;iDCardCoordRes2.gender_coord final_result.gender_coord;iDCardCoordRes2.birth_coord final_result.birth_coord;iDCardCoordRes2.address_coord final_result.address_coord;iDCardCoordRes2.id_number_coord final_result.id_number_coord;iDCardCoordRes2.ethnicity_coord final_result.ethnicity_coord;iDCardCoordRes2.authority_coord final_result.authority_coord;iDCardCoordRes2.issuing_date_coord final_result.issuing_date_coord;iDCardCoordRes2.expiry_date_coord final_result.expiry_date_coord;textBox1.Text JsonConvert.SerializeObject(iDCardCoordRes2, Newtonsoft.Json.Formatting.Indented);DrawRes2(image, iDCardCoordRes2.name_coord);DrawRes2(image, iDCardCoordRes2.gender_coord);DrawRes2(image, iDCardCoordRes2.birth_coord);DrawRes2(image, iDCardCoordRes2.address_coord);DrawRes2(image, iDCardCoordRes2.id_number_coord);DrawRes2(image, iDCardCoordRes2.ethnicity_coord);DrawRes2(image, iDCardCoordRes2.authority_coord);DrawRes2(image, iDCardCoordRes2.issuing_date_coord);DrawRes2(image, iDCardCoordRes2.expiry_date_coord);if (pictureBox1.Image ! null){pictureBox1.Image.Dispose();pictureBox1.Image null;}pictureBox1.Image new Bitmap(image.ToMemoryStream());image.Dispose();}} }下载 C封装源码下载 C#调用源码下载 SDK下载
http://www.w-s-a.com/news/545066/

相关文章:

  • 网站使用说明书网站建设公司的介绍
  • 推广型网站免费建设网站防盗链设置
  • 建设银行网站查开户行网站反链暴增怎么回事
  • centos7做网站软件实施工程师工资一般多少
  • 专业房产网站建设深圳建设交易集团
  • 政务网站建设标准项目经理接到网站开发怎么开展
  • 网站框架设计好后怎么做网站广告销售怎们做
  • asp技校网站保定八大平台公司
  • wordpress网站前端优化网站备案批量查询
  • 北京企业做网站杭州seo中心
  • 护肤品网站建设前的行业分析wordpress电子书模板
  • 做网站怎么销售.net开发网站怎么样
  • 蚌埠网站优化网站换空间wordpress
  • 微网站开发框架公司企业logo
  • 大淘客官网做的网站打不开网站建设完成
  • 婚纱摄影网站模板让别人做网站怎样才安全
  • 技术支持 骏域网站建设专家佛山网站运营管理教材
  • 个体营业执照可以做网站服务吗电商运营学校培训
  • 企业网站免费推广的方法.wordpress 爱情模板下载地址
  • 轻淘客 轻网站怎么做手机开发人员选项怎么打开
  • 天津做网站制作公司html网站 下载
  • 哪个网站的课件做的好crm客户管理系统全称
  • 网站建设工作室创业计划书seo是什么职位的简称
  • o2o平台网站开发什么是白帽seo
  • 免费建个人手机网站WordPress 简历库
  • 建网站 是否 数据库阳瘘的最佳治疗方法是什么
  • 知晓程序网站怎么做网站基础维护
  • 兼职做网站赚钱吗图片设计制作哪个软件好手机
  • 做手机旅游网站智慧校园登录入口
  • 莆田网站建设维护国外极简网站