以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 阿里云身份证识别 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=176209) |
-- 作者:lxhmax -- 发布时间:2022/4/4 15:54:00 -- 阿里云身份证识别 https://vision.aliyun.com/experience/detail?spm=api-workbench.API%20Document.0.0.75f41e0flJd2fC&&tagName=ocr&children=RecognizeIdentityCard 老师,请问下阿里云这个身份之识别的语言如何转换成狐表的语言? |
-- 作者:SbFox -- 发布时间:2022/4/4 16:41:00 -- 选 .Net的代码 c#转vb.net,参考 http://converter.telerik.com/ |
-- 作者:lxhmax -- 发布时间:2022/4/4 16:52:00 -- 转换之后是下面这样的,要如何在狐表里使用? Imports System Imports System.Collections.Generic Imports Aliyun.Acs.Core Imports Aliyun.Acs.Core.Profile Imports Aliyun.Acs.Core.Exceptions Imports Aliyun.Acs.Core.Http Namespace CommonRequestDemo Class Program Private Shared Sub Main(ByVal args As String()) Dim profile As IClientProfile = DefaultProfile.GetProfile("cn-shanghai", "<accessKeyId>", "<accessSecret>") Dim client As DefaultAcsClient = New DefaultAcsClient(profile) Dim request As CommonRequest = New CommonRequest() request.Method = MethodType.POST request.Domain = "ocr.cn-shanghai.aliyuncs.com" request.Version = "2019-12-30" request.Action = "RecognizeIdentityCard" request.AddQueryParameters("Side", "back") request.AddQueryParameters("ImageURL", "http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeIdentityCard/sfzbm1.jpg") Try Dim response As CommonResponse = client.GetCommonResponse(request) Console.WriteLine(System.Text.Encoding.[Default].GetString(response.HttpResponse.Content)) Catch e As ServerException Console.WriteLine(e) Catch e As ClientException Console.WriteLine(e) End Try End Sub End Class End Namespace |
-- 作者:有点蓝 -- 发布时间:2022/4/5 21:33:00 -- 下载阿里云for .net4.0版本的dll复制到Foxtable的安装目录,然后引用:http://www.foxtable.com/webhelp/topics/1936.htm 调用代码参考,按照下面红色字的方式补全蓝色字各种类型的命名空间,至于是哪个命名空间,可以咨询阿里云客服,或者看sdk源码 Dim profile As Aliyun.Acs.Core.Profile.IClientProfile = Aliyun.Acs.Core.Profile.DefaultProfile.GetProfile("cn-shanghai", "<accessKeyId>", "<accessSecret>") Dim client As xx命名空间.DefaultAcsClient = New xx命名空间.DefaultAcsClient(profile) Dim request As xx命名空间.CommonRequest = New xx命名空间.CommonRequest() request.Method = MethodType.POST request.Domain = "ocr.cn-shanghai.aliyuncs.com" request.Version = "2019-12-30" request.Action = "RecognizeIdentityCard" request.AddQueryParameters("Side", "back") request.AddQueryParameters("ImageURL", "http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeIdentityCard/sfzbm1.jpg") Try Dim response As CommonResponse = client.GetCommonResponse(request) dim ret as string = System.Text.Encoding.[Default].GetString(response.HttpResponse.Content) msgbox(ret ) Catch e As Exception msgbox(e.message) End Try |