1、智能图像处理 - 接口说明
支持 JPG、JPEG、PNG、WEBP、BMP、TIF、TIFF 图像,不支持 PDF 文件。可按需开启畸变矫正、自动旋转、去水印、图像增强、去手写和去手指功能。
| 接口地址 | |
|---|---|
| 图片为base64流 | https://netocr.com/api/pic_process_base64 |
| 图片为file格式 | https://netocr.com/api/pic_process_file |
| 接口调用方法 | post |
(注:base64流接口传参数img,file格式接口传参数file,两者选择对应接口传入。)
2、接口接收参数
| 序号 | 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| 1 | img | String | 是 | 图片的base64流,仅base64接口传入 |
| 2 | file | MultipartFile | 是 | 上传文件,仅file接口传入,字段名必须为file |
| 3 | key | String | 是 | 用户ocrKey |
| 4 | secret | String | 是 | 用户ocrSecret |
| 5 | typeId | Integer | 是 | 产品类型:3100 |
| 6 | format | String | 是 | 固定值:json |
| 7 | distortionCorrect | Integer | 否 | 畸变矫正:0-关闭(默认) 1-开启 |
| 8 | autoRotation | Integer | 否 | 自动旋转:0-关闭(默认) 1-开启 |
| 9 | removeWaterMark | Integer | 否 | 去水印:0-关闭(默认) 1-开启 |
| 10 | imageEnhance | Integer | 否 | 图像增强:0-关闭(默认) 1-开启 |
| 11 | removeHandwriting | Integer | 否 | 去手写:0-关闭(默认) 1-开启 |
| 12 | removeFinger | Integer | 否 | 去手指:0-关闭(默认) 1-开启 |
3、结果示例
{
"message": {
"status": 0,
"value": "处理完成"
},
"info": {
"cutImage": "/9j/4AAQSkZJRgABAQ...",
"typeId": 3100
}
}