String filePath = [本地文件路径] ; byte [ ] imgData = FileUtil . readFileByBytes ( filePath ) ; String imgStr = Base64Util . encode ( imgData ) ; String imgParam = URLEncoder . encode ( imgStr , UTF-8 )
String filePath = [本地文件路径] ; byte [ ] imgData = FileUtil . readFileByBytes ( filePath ) ; String imgStr = Base64Util . encode ( imgData ) ; String imgParam = URLEncoder . encode ( imgStr , UTF-8 )
application/x-www-form-urlencoded' # encoding:utf-8 import requests import base64 ''' 出生医学证明识别 ''' request_url = https://aip.baidubce.com/rest/2.0/ocr/v1/birth_certificate # 二进制方式打开图片文件 f = open ( '[本地文件
String filePath = [本地文件路径] ; byte [ ] imgData = FileUtil . readFileByBytes ( filePath ) ; String imgStr = Base64Util . encode ( imgData ) ; String imgParam = URLEncoder . encode ( imgStr , UTF-8 )
String filePath = [本地文件路径] ; byte [ ] imgData = FileUtil . readFileByBytes ( filePath ) ; String imgStr = Base64Util . encode ( imgData ) ; String imgParam = URLEncoder . encode ( imgStr , UTF-8 )
String filePath = [本地文件路径] ; byte [ ] imgData = FileUtil . readFileByBytes ( filePath ) ; String imgStr = Base64Util . encode ( imgData ) ; String imgParam = URLEncoder . encode ( imgStr , UTF-8 )
String filePath = [本地文件路径] ; byte [ ] imgData = FileUtil . readFileByBytes ( filePath ) ; String imgStr = Base64Util . encode ( imgData ) ; String imgParam = URLEncoder . encode ( imgStr , UTF-8 )
String filePath = [本地文件路径] ; byte [ ] imgData = FileUtil . readFileByBytes ( filePath ) ; String imgStr = Base64Util . encode ( imgData ) ; String imgParam = URLEncoder . encode ( imgStr , UTF-8 )
String filePath = [本地文件路径] ; byte [ ] imgData = FileUtil . readFileByBytes ( filePath ) ; String imgStr = Base64Util . encode ( imgData ) ; String imgParam = URLEncoder . encode ( imgStr , UTF-8 )
String filePath = [本地文件路径] ; byte [ ] imgData = FileUtil . readFileByBytes ( filePath ) ; String imgStr = Base64Util . encode ( imgData ) ; String imgParam = URLEncoder . encode ( imgStr , UTF-8 )