|
|
识别率在90%左右,分辨率需要设置成720*1080
自己调用接口测试
需要定制可以联系:hack-xl
下面是python调用案例:
self.mytprc.touchDown(1, 95, 865)
url = "http://127.0.0.1:5000/and_api/v1/screenshots/" + self.heziip + "/" + self.name + "/3"
jg = requests.get(url).json()
if jg['code'] == 200:
try:
url = "http://hk.wancaiwangluo.com/calculate-angle"
data = {
'image': jg['message']
}
sb = requests.post(url=url, json=data).json()
du = sb['angle']
if int(du) == 0:
print(f'{self.name}-滑块识别失败!!!')
self.getshiping()
else:
yidong = int(du) / 0.42353
time.sleep(1)
y = 865
x = 95
for bu in range(int(yidong)):
x += 1
if bu % 2 == 0:
y = y - 2
else:
y = y + 3
self.mytprc.touchMove(1, x, y)
time.sleep(0.005)
time.sleep(0.2)
self.mytprc.touchUp(1, int(95 + yidong), 865)
print(f'{self.name}-滑块识别完成!')
|
|