百度智能云

All Product Document

          Object Storage

          General OCR

          Feature Description

          The user requests the service to recognize all texts in an image.

          Request parameters

          Parameters Required? Type Optional Range Value Description
          language_type No string CHN_ENG, ENG, POR, FRE, GER, ITA, SPA, RUS, JAP, KOR Recognition language type, CHN_ENG by default. The optional values include:
          - CHN_ENG: Mixed Chinese and English;
          - ENG: English; -
          POR: Portuguese;
          - FRE: French;
          - GER: German;
          - ITA: Italian;
          - SPA: Spanish; -
          RUS: Russian;
          - JAP: Japanese;- KOR: Korean
          detect_direction No boolean true, false Whether to detect the image orientation? It is not detected by default, i.e., false. The orientation means that the input image is in the normal direction and rotates by 90°/ 180°/270° counterclockwise. The optional values include:
          -true: Check the direction;
          - false: Do not check the direction.
          detect_language No string true, false Is the language detected? It is not detected by default. At present, Chinese, English, Japanese, and Korean are supported.
          probability No string true, false Whether to return the confidence level of each row in recognition results.

          Return Parameter

          Field Required? Type Description
          direction No int32 Image direction. It exists when detect_direction=true.
          - -1: Undefined;
          - 0: Forward direction;
          - 1: 90° counterclockwise ;
          - 2: 180°counterclockwise; -
          3: 270°counterclockwise
          log_id Yes uint64 The unique log ID, which is used to locate the problem.
          words_result Yes array() Identification results array
          words_result_num Yes uint32 Number of recognition results, which indicates the number of elements in words_result.
          +words No string Recognition results string
          probability No object Confidence value of each row in recognition results, including average: average value of row confidence levels, variance: variance of row confidence levels, and min: minimum value of row confidence levels.

          Return Example

          {
          "log_id": 2471272194, 
          "words_result_num": 2,
          "words_result": 
              [
                  {"words": " TSINGTAO"}, 
                  {"words": "Tsingtao Beer"}
              ]
          }  
          Previous
          Face Detection
          Next
          Image Quality Recognition