以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 如何网页开发API调用代码 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=108328) |
-- 作者:baoxyang -- 发布时间:2017/10/20 11:42:00 -- 如何网页开发API调用代码 Dim hc As New HttpClient("http://tysbgpu.market.alicloudapi.com/api/predict/ocr_general") hc.Headers.Add("Authorization","APPCODE " & "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX") hc.C Dim ms As New System.IO.MemoryStream getImage(filepath).Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg) Dim BPicture As Byte() = New Byte(ms.Length - 1) {} BPicture = ms.GetBuffer() Dim image As String=Convert.ToBase64String(BPicture) Dim jo1 As New JObject jo1("image") = UrlEncode(image) jo1("configure") = New JObject jo1("configure")("min_size") = 16 jo1("configure")("output_prob") = True hc.Content = jo1.ToString() Dim jo As New JObject jo.Parse(hc.GetData)
|
-- 作者:有点甜 -- 发布时间:2017/10/20 12:29:00 -- 参考
http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=104710&skin=0
http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=106768&authorid=0&page=0&star=1
|