发帖
充值
 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
17 0

OCR文字识别白嫖

源码分享 13384 17 2021-11-30 18:07:33
本帖最后由 flk100207 于 2021-11-30 18:19 编辑

local tick = tickCount()
snapShot("/storage/emulated/0/test.png",0,0,720,1280)
local b64 = getFileBase64("/storage/emulated/0/test.png")
b64 = 类_字符串.uft8字符转URL编码(b64)
b64=httpPost("https://aip.baidubce.com/rest/2.0/ocr/v1/accurate_basic?access_token=24.013a64e3e007fda91f102cf8f6c8a9c3.2592000.1640690211.282335-11278949&aipSdk=Android&aipSdkVersion=1_4_4&aipDevid=c0852d69-9910-4dd5-92ae-ec4fab9cb549","Content-Type=application/x-www-form-urlencoded&image="..b64)
--print(b64)
b64 = splitStr(b64,":[")
local 数组={}
if #b64 >= 2 then
        b64 = splitStr(b64[2],"]")
        if #b64 >= 2 then
                b64 = splitStr(b64[1],"},{")
                for pxwzs=1,#b64 do
                        pxt = string.match(b64[pxwzs], "words"..'":"'.."(.-)"..'"')
                        数组[pxwzs]=pxt
                end
        end
end
print(tickCount()-tick)
print(数组)

使用道具 举报

2021-11-30 20:18:16
学习下
2021-12-9 11:13:38
大佬大佬
2022-4-9 10:13:57
大佬大佬!!!学习了。谢谢
2022-4-11 15:04:42
学习学习
2022-4-27 18:33:25
:lol
2022-5-19 19:30:33


谢谢大佬分享 !
2023-1-3 15:54:37
学习了!!!
2023-2-24 00:33:56

大佬大佬
2023-4-2 15:09:45
全屏找不到呢
您需要登录后才可以回帖 立即登录
高级模式
12下一页
源码分享