/
Python DEMO:Perform image recognition on English numerals using OCR.
Python DEMO:Perform image recognition on English numerals using OCR.
代码
import sys
sys.path.append(".")
import base64
import requests
with open("ocr/文字验证码/8we1.png", 'rb') as f:
image = f.read()
image = base64.b64encode(image)
image = str(image, 'utf8')
data = {
"clientKey":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"task":
{
"type": "ImageToTextTaskTest",
"body": image # base64编码后的图片
}
}
r = requests.post("https://api.yescaptcha.com/createTask", json=data).json()
print(r)
输出
{'errorId': 0, 'errorCode': '', 'status': 'ready', 'solution': {'text': '8we1'}, 'taskId': '1fb204c2-d8d7-11ec-9dc6-8a3e9a7e9eea'}
, multiple selections available,
Related content
Python DEMO:英文数字ocr图像识别
Python DEMO:英文数字ocr图像识别
More like this
ImageToTextTask: English and numeric characters in images with varying lengths
ImageToTextTask: English and numeric characters in images with varying lengths
More like this
HCaptchaClassification: hCaptcha image recognition
HCaptchaClassification: hCaptcha image recognition
More like this
FunCaptchaClassification: FunCaptcha image recognition
FunCaptchaClassification: FunCaptcha image recognition
More like this
createTask : captcha task creating
createTask : captcha task creating
More like this
ReCaptchaV2Classification: reCaptcha V2 图像识别
ReCaptchaV2Classification: reCaptcha V2 图像识别
More like this