Free OCR image recognition text recognition API

1. OCR image recognition and text recognition

Optical Character Recognition (OCR) refers to the process of analyzing and recognizing image files of text materials to obtain text and layout information. That is, the text in the image is recognized and returned in the form of text.

Text recognition in natural scenes is extremely difficult. The reasons include: the picture background is extremely rich and often faces problems such as low brightness, low contrast, uneven lighting, perspective distortion, and incomplete occlusion. Moreover, the layout of the text may be distorted, wrinkled, reversed, etc. The problem is that the text may have different fonts, sizes, weights, and colors.

Insert image description here

2. Usage steps

1. Interface

Important note: It is recommended to use https protocol. When https protocol cannot be used, try to use http protocol.

Request method: POST

https://luckycola.com.cn/aiTools/imgOcr

2. Request parameters

Important reminder⚠️ : The request parameter of this interface is in multipart/form-data format⚠️

serial number parameter Is it necessary illustrate
1 ColaKey yes The only verification ColaKey can be obtained from the official website ( http(s): //luckycola.com.cn )
2 file yes Image resources that need to be identified (png, jpg, jpeg format). Note: The request parameter of this interface is in multipart/form-data format .
3 lang no Is the content of the currently detected image in Chinese or English? If it is Chinese, just do not pass the parameter value. If it is English, enter "eng", be sure to set the value correctly.

Note!!!: If you don’t have ColaKey yet, please go to the official website personal center to get it.
Official website address: http(s): //luckycola.com.cn/

3. Example of request parameters

Important reminder⚠️ : The request parameter of this interface is in multipart/form-data format⚠️

Insert image description here

4. Interface return example

{
    
    
	// 接口返回成功
	"code": 0,
	// 接口返回提示
	"msg": "OCR识别成功",
	"data": {
    
    
		// 图片OCR识别出来的文本内容
		"text": "LC 官 网 部 分  、AI 聊 天 接 口"
	}
}

3. Tips

Pay attention to the following points, which can greatly improve the accuracy of OCR content recognition

  1. The image to be recognized should be as clear and easy to identify as possible
  2. Try to concentrate as much content as possible in the recognized image.
  3. The content in the recognized image should contain only one language and the api parameters should be correctly passed in the value corresponding to lang.

Guess you like

Origin blog.csdn.net/qq_48896417/article/details/132520827