forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Sheng, Lichang <lichangsheng1@noreply.gitea.eco.tsi-dev.otc-service.com> Co-committed-by: Sheng, Lichang <lichangsheng1@noreply.gitea.eco.tsi-dev.otc-service.com>
518 lines
43 KiB
HTML
518 lines
43 KiB
HTML
<a name="ocr_03_0031"></a><a name="ocr_03_0031"></a>
|
|
|
|
<h1 class="topictitle1">General Table</h1>
|
|
<div id="body0000001744562005"><div class="section" id="ocr_03_0031__section449391016167"><h4 class="sectiontitle">Function</h4><p id="ocr_03_0031__p14292124881620">This API detects and extracts text from table images and converts the text into JSON format. The returned results include two types of image area (words_region): text area (text) and table area (table). They also include table structures (rows and columns) and text information.</p>
|
|
</div>
|
|
<div class="section" id="ocr_03_0031__section18498141021611"><h4 class="sectiontitle">Constraints and Limitations</h4><ul id="ocr_03_0031__ul17271911121616"><li id="ocr_03_0031__li827911161618">Only images in PNG, JPG, JPEG, BMP, or TIFF format can be recognized.</li><li id="ocr_03_0031__li0271211151616">No side of the image can be smaller than 15 or larger than 8,192 pixels.</li><li id="ocr_03_0031__li527181171613">The area to be recognized must occupy more than 80% of the image. When scanning a table, ensure that the entire table and its surrounding area are included in the image.</li><li id="ocr_03_0031__li1627131116161">An image can be rotated to any angle.</li><li id="ocr_03_0031__li12881141617">Text in images with complex backgrounds (such as outdoor scenery or anti-counterfeit watermarks) or distorted table lines cannot be recognized.</li><li id="ocr_03_0031__li122841131614">English and Chinese are supported but support for traditional Chinese characters is limited.</li></ul>
|
|
</div>
|
|
<div class="section" id="ocr_03_0031__section1450512108162"><h4 class="sectiontitle">URI</h4><p id="ocr_03_0031__p1329141161613">POST /v2/{project_id}/ocr/general-table</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ocr_03_0031__table185051610151620" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="ocr_03_0031__row72911117162"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.4.1.1"><p id="ocr_03_0031__p529511131615">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.4.1.2"><p id="ocr_03_0031__p1229411131617">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.3.3.2.4.1.3"><p id="ocr_03_0031__p1029811201614">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ocr_03_0031__row429141131619"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.4.1.1 "><p id="ocr_03_0031__p1629111191617">endpoint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.4.1.2 "><p id="ocr_03_0031__p1298115160">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.3.2.4.1.3 "><p id="ocr_03_0031__p152971114162">Endpoint, which is the request address for calling an API.</p>
|
|
<p id="ocr_03_0031__p329191131611">The endpoint varies depending on services in different regions. For more details, see <a href="ocr_03_0062.html">Endpoint</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row43051113162"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.4.1.1 "><p id="ocr_03_0031__p193012119169">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.4.1.2 "><p id="ocr_03_0031__p83011113162">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.3.2.4.1.3 "><p id="ocr_03_0031__p3301911201613">Project ID, which can be obtained by referring to <a href="ocr_03_0130.html">Obtaining the Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ocr_03_0031__section175201610121612"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ocr_03_0031__table1252171071614" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="ocr_03_0031__row153091101615"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="ocr_03_0031__p3301711141611">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="ocr_03_0031__p123031191615">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="ocr_03_0031__p1430181111613">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="ocr_03_0031__p183051117160">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ocr_03_0031__row430121181612"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="ocr_03_0031__p330131111611">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="ocr_03_0031__p143091111611">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="ocr_03_0031__p1330131191620">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="ocr_03_0031__p93181115164">User token.</p>
|
|
<p id="ocr_03_0031__p73101117169">Used to obtain the permission to call APIs. The token is the value of <strong id="ocr_03_0031__b1744218285418">X-Subject-Token</strong> in the response header in <a href="ocr_03_0005.html">Authentication</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row63151131617"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="ocr_03_0031__p6311011151619">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="ocr_03_0031__p63111151616">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="ocr_03_0031__p10313116169">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="ocr_03_0031__p103131118168">MIME type of the request body. The value is <strong id="ocr_03_0031__b56413325418">application/json</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ocr_03_0031__table954901041617" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="ocr_03_0031__row193281141615"><th align="left" class="cellrowborder" valign="top" width="15.308469153084689%" id="mcps1.3.4.3.2.5.1.1"><p id="ocr_03_0031__p33220117168">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.32836716328367%" id="mcps1.3.4.3.2.5.1.2"><p id="ocr_03_0031__p163271120162">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.268673132686729%" id="mcps1.3.4.3.2.5.1.3"><p id="ocr_03_0031__p93241171616">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="55.0944905509449%" id="mcps1.3.4.3.2.5.1.4"><p id="ocr_03_0031__p113210111163">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ocr_03_0031__row532201110165"><td class="cellrowborder" valign="top" width="15.308469153084689%" headers="mcps1.3.4.3.2.5.1.1 "><p id="ocr_03_0031__p113291116163">image</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.32836716328367%" headers="mcps1.3.4.3.2.5.1.2 "><p id="ocr_03_0031__p1832181116164">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.268673132686729%" headers="mcps1.3.4.3.2.5.1.3 "><p id="ocr_03_0031__p193241121610">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.0944905509449%" headers="mcps1.3.4.3.2.5.1.4 "><p id="ocr_03_0031__p3321411171616">Set either this parameter or <strong id="ocr_03_0031__b14217953425">url</strong>.</p>
|
|
<p id="ocr_03_0031__p1832511111616">Base64-encoded image file. The image file has a size limit of 10 MB.</p>
|
|
<p id="ocr_03_0031__p16322110169">No side of the image can be smaller than 15 or larger than 8,192 pixels. Only images in JPEG, JPG, PNG, BMP, or TIFF format can be recognized.</p>
|
|
<p id="ocr_03_0031__p133201171617">An example is <strong id="ocr_03_0031__b35965783175854">/9j/4AAQSkZJRgABAg...</strong>. If the image data contains an unnecessary prefix, the error "The image format is not supported" is reported.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row17326111169"><td class="cellrowborder" valign="top" width="15.308469153084689%" headers="mcps1.3.4.3.2.5.1.1 "><p id="ocr_03_0031__p4321611161615">url</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.32836716328367%" headers="mcps1.3.4.3.2.5.1.2 "><p id="ocr_03_0031__p43271118167">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.268673132686729%" headers="mcps1.3.4.3.2.5.1.3 "><p id="ocr_03_0031__p113251161618">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.0944905509449%" headers="mcps1.3.4.3.2.5.1.4 "><p id="ocr_03_0031__p1932111161619">Set either this parameter or <strong id="ocr_03_0031__b4303087575854">image</strong>. Image URL. Currently, the following URLs are supported:</p>
|
|
<ul id="ocr_03_0031__ul1832111114162"><li id="ocr_03_0031__li125979581460">Public HTTP/HTTPS URL</li><li id="ocr_03_0031__li193210115162">URL provided by OBS.</li></ul>
|
|
<div class="note" id="ocr_03_0031__note356121013169"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="ocr_03_0031__ul933141171616"><li id="ocr_03_0031__li83381110163">The API response time depends on the image download time. If the image download takes a long time, the API call will fail.</li><li id="ocr_03_0031__li1733211131613">Ensure that the storage service where the images to be detected reside is stable and reliable. OBS is recommended for storing image data.</li><li id="ocr_03_0031__li1331411101616">The URL cannot contain Chinese characters. If Chinese characters exist, they must be encoded using UTF-8.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row1833111116163"><td class="cellrowborder" valign="top" width="15.308469153084689%" headers="mcps1.3.4.3.2.5.1.1 "><p id="ocr_03_0031__p2331111171617">return_text_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.32836716328367%" headers="mcps1.3.4.3.2.5.1.2 "><p id="ocr_03_0031__p18331911101615">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.268673132686729%" headers="mcps1.3.4.3.2.5.1.3 "><p id="ocr_03_0031__p1333121161618">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.0944905509449%" headers="mcps1.3.4.3.2.5.1.4 "><p id="ocr_03_0031__p1433111112168">Whether to return coordinates of text blocks and cells. Possible values are as follows:</p>
|
|
<ul id="ocr_03_0031__ul43341117162"><li id="ocr_03_0031__li1133191141611"><strong id="ocr_03_0031__b92244016675854">true</strong>: Coordinates of text blocks and cells will be returned.</li><li id="ocr_03_0031__li63317118165"><strong id="ocr_03_0031__b122622721375854">false</strong>: Coordinates of text blocks and cells will not be returned.</li></ul>
|
|
<p id="ocr_03_0031__p1833011141619">If this parameter is not specified, <strong id="ocr_03_0031__b171225176875854">false</strong> is used by default.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row19331011181615"><td class="cellrowborder" valign="top" width="15.308469153084689%" headers="mcps1.3.4.3.2.5.1.1 "><p id="ocr_03_0031__p83341111611">return_char_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.32836716328367%" headers="mcps1.3.4.3.2.5.1.2 "><p id="ocr_03_0031__p933181131614">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.268673132686729%" headers="mcps1.3.4.3.2.5.1.3 "><p id="ocr_03_0031__p433011151617">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.0944905509449%" headers="mcps1.3.4.3.2.5.1.4 "><p id="ocr_03_0031__p733121121619">Coordinate information of a single character. The options are as follows:</p>
|
|
<ul id="ocr_03_0031__ul5330117165"><li id="ocr_03_0031__li1933121191614"><strong id="ocr_03_0031__b85621389975854">true</strong>: The coordinates of a single character will be returned.</li><li id="ocr_03_0031__li16332110168"><strong id="ocr_03_0031__b161742495275854">false</strong>: The coordinates of a single character will not be returned.</li></ul>
|
|
<p id="ocr_03_0031__p1434611151616">If this parameter is not specified, <strong id="ocr_03_0031__b173167593175854">false</strong> is used by default. If this parameter is set to <strong id="ocr_03_0031__b107380919675854">true</strong>, <strong id="ocr_03_0031__b109290289875854">return_text_location</strong> must be <strong id="ocr_03_0031__b89899610375854">true</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row14341611141618"><td class="cellrowborder" valign="top" width="15.308469153084689%" headers="mcps1.3.4.3.2.5.1.1 "><p id="ocr_03_0031__p13421111616">return_confidence</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.32836716328367%" headers="mcps1.3.4.3.2.5.1.2 "><p id="ocr_03_0031__p113418118169">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.268673132686729%" headers="mcps1.3.4.3.2.5.1.3 "><p id="ocr_03_0031__p193451131611">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.0944905509449%" headers="mcps1.3.4.3.2.5.1.4 "><p id="ocr_03_0031__p234511181614">Whether the confidence will be returned. The options are as follows:</p>
|
|
<ul id="ocr_03_0031__ul734181141617"><li id="ocr_03_0031__li1734111141613"><strong id="ocr_03_0031__b39092957075854">true</strong>: The confidence will be returned.</li><li id="ocr_03_0031__li6341911121615"><strong id="ocr_03_0031__b8435565075854">false</strong>: The confidence will not be returned.</li></ul>
|
|
<p id="ocr_03_0031__p18345112166">If this parameter is not specified, <strong id="ocr_03_0031__b138292804475854">false</strong> is used by default. In this case, the confidence will not be returned.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row17341311201614"><td class="cellrowborder" valign="top" width="15.308469153084689%" headers="mcps1.3.4.3.2.5.1.1 "><p id="ocr_03_0031__p12341511141611">return_excel</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.32836716328367%" headers="mcps1.3.4.3.2.5.1.2 "><p id="ocr_03_0031__p2346119162">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.268673132686729%" headers="mcps1.3.4.3.2.5.1.3 "><p id="ocr_03_0031__p53419119167">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.0944905509449%" headers="mcps1.3.4.3.2.5.1.4 "><p id="ocr_03_0031__p133419117162">Whether to return the Base64-encoded field for converting a table into a Microsoft Excel file. The options are as follows:</p>
|
|
<ul id="ocr_03_0031__ul134711121618"><li id="ocr_03_0031__li2342011111619"><strong id="ocr_03_0031__b10762323075854">true</strong>: The Base64-encoded <strong id="ocr_03_0031__b3037958275854">excel</strong> field will be returned.</li><li id="ocr_03_0031__li143415114168"><strong id="ocr_03_0031__b81777815175854">false</strong>: The Base64-encoded <strong id="ocr_03_0031__b68269425475854">excel</strong> field will not be returned. The default value is <strong id="ocr_03_0031__b136571550575854">false</strong>.</li></ul>
|
|
<p id="ocr_03_0031__p1934111120163">You can use the Python function <strong id="ocr_03_0031__b91506073975854">base64.b64decode</strong> to decode the returned Excel code and save it as an .xlsx file.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row19341411161613"><td class="cellrowborder" valign="top" width="15.308469153084689%" headers="mcps1.3.4.3.2.5.1.1 "><p id="ocr_03_0031__p143431131618">return_rectification_matrix</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.32836716328367%" headers="mcps1.3.4.3.2.5.1.2 "><p id="ocr_03_0031__p13349119169">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.268673132686729%" headers="mcps1.3.4.3.2.5.1.3 "><p id="ocr_03_0031__p63412116161">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.0944905509449%" headers="mcps1.3.4.3.2.5.1.4 "><p id="ocr_03_0031__p1335101121612">The options are as follows:</p>
|
|
<ul id="ocr_03_0031__ul123514116163"><li id="ocr_03_0031__li18358114161"><strong id="ocr_03_0031__b167722100475854">true</strong>: The perspective transformation matrix will be returned.</li><li id="ocr_03_0031__li5357118160"><strong id="ocr_03_0031__b118693262175854">false</strong>: The perspective transformation matrix will not be returned.</li></ul>
|
|
<p id="ocr_03_0031__p635711171617">If this parameter is not specified, <strong id="ocr_03_0031__b160669734975854">false</strong> is used by default. In this case, the perspective transformation matrix will not be returned.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row17356115165"><td class="cellrowborder" valign="top" width="15.308469153084689%" headers="mcps1.3.4.3.2.5.1.1 "><p id="ocr_03_0031__p163513118166">with_borders</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.32836716328367%" headers="mcps1.3.4.3.2.5.1.2 "><p id="ocr_03_0031__p23510119166">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.268673132686729%" headers="mcps1.3.4.3.2.5.1.3 "><p id="ocr_03_0031__p2035101118163">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.0944905509449%" headers="mcps1.3.4.3.2.5.1.4 "><p id="ocr_03_0031__p113571112162">The options are as follows:</p>
|
|
<ul id="ocr_03_0031__ul123571116163"><li id="ocr_03_0031__li935911201611"><strong id="ocr_03_0031__b115372677875854">true</strong>: The input image contains only bordered tables, and only such tables are recognized.</li><li id="ocr_03_0031__li735191161610"><strong id="ocr_03_0031__b59804943575854">false</strong>: The input image may contain borderless tables, and both bordered and borderless tables are recognized.</li></ul>
|
|
<p id="ocr_03_0031__p103591121617">If this parameter is not specified, the default value <strong id="ocr_03_0031__b114101112675854">false</strong> is used. If the input image contains only bordered tables, set this parameter to <strong id="ocr_03_0031__b143451212875854">true</strong> to achieve more accurate recognition results.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ocr_03_0031__section9609910111618"><h4 class="sectiontitle">Response Parameters</h4><div class="note" id="ocr_03_0031__note7610121015168"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ocr_03_0031__p10361811111611">The status code may vary depending on the recognition results. For example, <strong id="ocr_03_0031__b146513108475854">200</strong> indicates that the API is successfully called, and <strong id="ocr_03_0031__b35306769775854">400</strong> indicates that the API fails to be called. The following describes the status codes and corresponding response parameters.</p>
|
|
</div></div>
|
|
<p id="ocr_03_0031__p1536101131615"><strong id="ocr_03_0031__b896782417466">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ocr_03_0031__table5611310161617" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameter</caption><thead align="left"><tr id="ocr_03_0031__row8361011121612"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="ocr_03_0031__p123641110165">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p id="ocr_03_0031__p3361211151615">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.4.2.4.1.3"><p id="ocr_03_0031__p11363118166">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ocr_03_0031__row1136511121611"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="ocr_03_0031__p736151131616">result</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="ocr_03_0031__p1042545063218"><a href="#ocr_03_0031__table1561310103163">Table 5</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="ocr_03_0031__p1361117169">Calling result of a successful API call</p>
|
|
<p id="ocr_03_0031__p33771119162">This parameter is not included when the API fails to be called.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ocr_03_0031__table1561310103163"></a><a name="table1561310103163"></a><table cellpadding="4" cellspacing="0" summary="" id="ocr_03_0031__table1561310103163" frame="border" border="1" rules="all"><caption><b>Table 5 </b>GeneralTableResult</caption><thead align="left"><tr id="ocr_03_0031__row1237151161617"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.1"><p id="ocr_03_0031__p4372111167">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.2"><p id="ocr_03_0031__p1637411171614">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.5.2.4.1.3"><p id="ocr_03_0031__p183701118164">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ocr_03_0031__row1137151151612"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="ocr_03_0031__p11378117163">words_region_count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="ocr_03_0031__p138711101611">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="ocr_03_0031__p12382113162">Number of text areas</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row438201191613"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="ocr_03_0031__p53861117162">words_region_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="ocr_03_0031__p638171161616">Array of <a href="#ocr_03_0031__table9622110181613">Table 6</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="ocr_03_0031__p33881116163">List of recognition results in text areas. The output sequence is from left to right and from top to bottom.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row123921111612"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="ocr_03_0031__p10391119163">excel</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="ocr_03_0031__p1739121161616">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="ocr_03_0031__p19397117165">The table image is converted into the Base64 code of the Excel file. The text and table in the image are written into the Excel file by position. You can use <strong id="ocr_03_0031__b44119360975854">base64.b64decode</strong> to decode the returned Excel code and save it as an .xlsx file.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ocr_03_0031__table9622110181613"></a><a name="table9622110181613"></a><table cellpadding="4" cellspacing="0" summary="" id="ocr_03_0031__table9622110181613" frame="border" border="1" rules="all"><caption><b>Table 6 </b>WordsRegionList</caption><thead align="left"><tr id="ocr_03_0031__row17401811181618"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.1"><p id="ocr_03_0031__p340511141615">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.2"><p id="ocr_03_0031__p3401311181613">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.6.2.4.1.3"><p id="ocr_03_0031__p10401111161615">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ocr_03_0031__row240121113169"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="ocr_03_0031__p6419111166">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="ocr_03_0031__p84110110169">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="ocr_03_0031__p341911161611">Type of the text identification area. The options are as follows:</p>
|
|
<ul id="ocr_03_0031__ul1641191161611"><li id="ocr_03_0031__li641811171613"><strong id="ocr_03_0031__b65485176675854">text</strong>: text recognition area</li><li id="ocr_03_0031__li20411511131610"><strong id="ocr_03_0031__b47678130875854">table</strong>: table recognition area</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row15418119168"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="ocr_03_0031__p194117116161">words_block_count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="ocr_03_0031__p1241511151618">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="ocr_03_0031__p14117111161">Number of text blocks recognized in a sub-area</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row2411011181612"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="ocr_03_0031__p164191181614">words_block_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="ocr_03_0031__p242111161619">Array of <a href="#ocr_03_0031__table16308106165">Table 7</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="ocr_03_0031__p1442141121615">List of text blocks recognized in a sub-area. The output sequence is from left to right and from top to bottom.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ocr_03_0031__table16308106165"></a><a name="table16308106165"></a><table cellpadding="4" cellspacing="0" summary="" id="ocr_03_0031__table16308106165" frame="border" border="1" rules="all"><caption><b>Table 7 </b>GeneralTableWordsBlockList</caption><thead align="left"><tr id="ocr_03_0031__row64291120162"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.1"><p id="ocr_03_0031__p0421611121614">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.2"><p id="ocr_03_0031__p16425117160">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.7.2.4.1.3"><p id="ocr_03_0031__p242181191611">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ocr_03_0031__row44261141617"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="ocr_03_0031__p174281131614">words</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="ocr_03_0031__p1142151131610">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="ocr_03_0031__p194271151614">Recognition result of a text block</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row15421111101619"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="ocr_03_0031__p24291120169">confidence</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="ocr_03_0031__p245201151615">Float</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="ocr_03_0031__p945181111616">Average confidence of fields. A higher confidence indicates a higher accuracy of the field identified. The confidence is calculated using algorithms and is not the measured accuracy.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row1945101113165"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="ocr_03_0031__p194512111169">location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="ocr_03_0031__p1845191111163">Array<Array<Integer>></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="ocr_03_0031__p04511191618">Text block location information, in list format, indicating the X and Y coordinates of the four vertices in a text block. The coordinate origin is the upper left corner of the image, the X axis is horizontal, and the Y axis is vertical.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row545191171619"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="ocr_03_0031__p11451611181617">words_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="ocr_03_0031__p154510117168">Array of <a href="#ocr_03_0031__table1664361091619">Table 8</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="ocr_03_0031__p1545191111611">List of the character blocks in a cell. The text is from left to right and from top to bottom. This parameter is available only when the input parameter <strong id="ocr_03_0031__b214525175475854">return_text_location</strong> is set to <strong id="ocr_03_0031__b99327581575854">true</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row16451611141614"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="ocr_03_0031__p346611181617">rows</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="ocr_03_0031__p164617110167">Array of integers</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="ocr_03_0031__p046111115164">Rows occupied by text. The values start from 0 and are displayed in a list. The data type is <strong id="ocr_03_0031__b82796671575854">Integer</strong>. This parameter is valid only in table recognition areas, that is, this parameter is valid only when <strong id="ocr_03_0031__b115473887875854">type</strong> is <strong id="ocr_03_0031__b4305261775854">table</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row146121171619"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="ocr_03_0031__p18463119169">columns</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="ocr_03_0031__p134621171618">Array of integers</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="ocr_03_0031__p1846811181615">Columns occupied by text. The values start from 0 and are displayed in a list. The data type is <strong id="ocr_03_0031__b147199683875854">Integer</strong>. This parameter is valid only in table recognition areas, that is, this parameter is valid only when <strong id="ocr_03_0031__b133501182475854">type</strong> is <strong id="ocr_03_0031__b132842913775854">table</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row1463114164"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="ocr_03_0031__p9461111111616">cell_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="ocr_03_0031__p15461311101610">Array<Array<Integer>></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="ocr_03_0031__p4464119168">Cell position information, in list format, indicating the X and Y coordinates of the four vertices in a cell. The coordinate origin is the upper left corner of the image, the X axis is horizontal, and the Y axis is vertical.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ocr_03_0031__table1664361091619"></a><a name="table1664361091619"></a><table cellpadding="4" cellspacing="0" summary="" id="ocr_03_0031__table1664361091619" frame="border" border="1" rules="all"><caption><b>Table 8 </b>WordsListIem</caption><thead align="left"><tr id="ocr_03_0031__row12491511101611"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.1"><p id="ocr_03_0031__p249161131619">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.2"><p id="ocr_03_0031__p749181181616">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.8.2.4.1.3"><p id="ocr_03_0031__p164971113169">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ocr_03_0031__row15491211121611"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="ocr_03_0031__p1749191118164">words</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="ocr_03_0031__p1749191141612">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="ocr_03_0031__p64915112164">Recognition result of a text block</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row1349121151616"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="ocr_03_0031__p1449611171619">confidence</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="ocr_03_0031__p134914117166">Float</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="ocr_03_0031__p94961113167">Average confidence of fields. A higher confidence indicates a higher accuracy of the field identified. The confidence is calculated using algorithms and is not the measured accuracy.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row134941113162"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="ocr_03_0031__p1449121121611">location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="ocr_03_0031__p1149181118169">Array<Array<Integer>></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="ocr_03_0031__p1449511131611">Text block location information, in list format, indicating the X and Y coordinates of the four vertices in a text block. The coordinate origin is the upper left corner of the image, the X axis is horizontal, and the Y axis is vertical.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row34931131615"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="ocr_03_0031__p15528116163">char_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="ocr_03_0031__p25211131619">Array of <a href="#ocr_03_0031__table166501710111617">Table 9</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="ocr_03_0031__p1552411131613">List of the character blocks in a cell. The text is from left to right and from top to bottom. This parameter is available only when the input parameters <strong id="ocr_03_0031__b19718862375854">return_text_location</strong> and <strong id="ocr_03_0031__b96454955975854">return_char_location</strong> are both set to <strong id="ocr_03_0031__b209158614375854">true</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ocr_03_0031__table166501710111617"></a><a name="table166501710111617"></a><table cellpadding="4" cellspacing="0" summary="" id="ocr_03_0031__table166501710111617" frame="border" border="1" rules="all"><caption><b>Table 9 </b>CharListIem</caption><thead align="left"><tr id="ocr_03_0031__row65211116163"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.9.2.4.1.1"><p id="ocr_03_0031__p185241119163">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.9.2.4.1.2"><p id="ocr_03_0031__p15521511161614">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.9.2.4.1.3"><p id="ocr_03_0031__p452111181619">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ocr_03_0031__row11521111101619"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="ocr_03_0031__p6521711171610">char</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="ocr_03_0031__p1552411131615">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="ocr_03_0031__p195231161620">Recognition result of a single character</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row95210112162"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="ocr_03_0031__p95281151611">char_confidence</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="ocr_03_0031__p1752171171612">Float</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="ocr_03_0031__p452411121615">Confidence of a single character. A higher confidence indicates a higher accuracy of the field identified. The confidence is calculated using algorithms and is not equal to the accuracy.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row352161112163"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="ocr_03_0031__p4531511151616">char_location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="ocr_03_0031__p85371121611">Array<Array<Integer>></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="ocr_03_0031__p653171141617">Location information of a single character, in list format, indicating the X and Y coordinates of the four vertices in a text block. The coordinate origin is the upper left corner of the image, the X axis is horizontal, and the Y axis is vertical.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="ocr_03_0031__p3531511151617"><strong id="ocr_03_0031__b119612615479">Status code: 400</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ocr_03_0031__table14655111091614" frame="border" border="1" rules="all"><caption><b>Table 10 </b>Response body parameters</caption><thead align="left"><tr id="ocr_03_0031__row35331117161"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.11.2.4.1.1"><p id="ocr_03_0031__p253191116163">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.11.2.4.1.2"><p id="ocr_03_0031__p135313114164">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.11.2.4.1.3"><p id="ocr_03_0031__p115321114165">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ocr_03_0031__row185311119168"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.1 "><p id="ocr_03_0031__p353161151611">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.2 "><p id="ocr_03_0031__p1653181121617">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.11.2.4.1.3 "><p id="ocr_03_0031__p14531211191618">Error code when calling the API failed</p>
|
|
<p id="ocr_03_0031__p2053911191613">This parameter is not returned when the API is successfully called.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row1553141119164"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.1 "><p id="ocr_03_0031__p145341117161">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.2 "><p id="ocr_03_0031__p12545111162">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.11.2.4.1.3 "><p id="ocr_03_0031__p243341116494">Error message when the API call fails</p>
|
|
<p id="ocr_03_0031__p05621141615">This parameter is not included when the API is successfully called.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ocr_03_0031__section1466171011162"><h4 class="sectiontitle">Example Request</h4><ul id="ocr_03_0031__ul6576111164"><li id="ocr_03_0031__li6571311181619">Transfer the Base64 code of a table image for recognition and does not return the confidence.<pre class="screen" id="ocr_03_0031__screen819214352919">POST https://{endpoint}/v2/{project_id}/ocr/general-table
|
|
Request Header:
|
|
Content-Type: application/json
|
|
X-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG...
|
|
Request Body:
|
|
{
|
|
"image":"/9j/4AAQSkZJRgABAgEASABIAAD/4RFZRXhpZgAATU0AKgAAAAg...",
|
|
"return_confidence":false
|
|
}</pre>
|
|
</li><li id="ocr_03_0031__li557911111619">Transfer the URL of a table image for recognition and does not return the confidence.<pre class="screen" id="ocr_03_0031__screen11878122042911">POST https://{endpoint}/v2/{project_id}/ocr/general-table
|
|
Request Header:
|
|
Content-Type: application/json
|
|
X-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG...
|
|
Request Body:
|
|
{
|
|
"url":"https://BucketName.obs.xxxx.com/ObjectName",
|
|
"return_confidence":false
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="ocr_03_0031__section16669210121615"><h4 class="sectiontitle">Example Response</h4><p id="ocr_03_0031__p258611121616"><strong id="ocr_03_0031__b239801211489">Status code: 200</strong></p>
|
|
<p id="ocr_03_0031__p1858141115167">Example response for a successful request</p>
|
|
<pre class="screen" id="ocr_03_0031__screen1058181118161">{
|
|
"result" : {
|
|
"words_region_count" : 2,
|
|
"words_region_list" : [ {
|
|
"type" : "text",
|
|
"words_block_count" : 1,
|
|
"words_block_list" : [ {
|
|
"words": "Text block 1 recognized in the text area",
|
|
"confidence" : 0.9991
|
|
} ]
|
|
}, {
|
|
"type" : "table",
|
|
"words_block_count" : 2,
|
|
"words_block_list" : [ {
|
|
"words": "Text block 1 recognized in the table area",
|
|
"confidence" : 0.9942,
|
|
"rows" : [ 0 ],
|
|
"columns" : [ 0 ]
|
|
}, {
|
|
"words": "Text block 2 recognized in the table area",
|
|
"confidence" : 0.914,
|
|
"rows" : [ 0 ],
|
|
"columns" : [ 1, 2 ]
|
|
} ]
|
|
} ]
|
|
}
|
|
}</pre>
|
|
<p id="ocr_03_0031__p156611141620"><strong id="ocr_03_0031__b866121181614">Status code: 400</strong></p>
|
|
<p id="ocr_03_0031__p2661115165">Example response for a failed request</p>
|
|
<pre class="screen" id="ocr_03_0031__screen106614119161">{
|
|
"result" : {
|
|
"error_code" : "AIS.0103",
|
|
"error_msg" : "The image size does not meet the requirements."
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ocr_03_0031__section66788109168"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ocr_03_0031__table0679111015169" frame="border" border="1" rules="all"><thead align="left"><tr id="ocr_03_0031__row1866171181611"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.8.2.1.3.1.1"><p id="ocr_03_0031__p1566611201610">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.8.2.1.3.1.2"><p id="ocr_03_0031__p466511171620">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ocr_03_0031__row1066411181612"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.8.2.1.3.1.1 "><p id="ocr_03_0031__p36612119166">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.8.2.1.3.1.2 "><p id="ocr_03_0031__p1967311111617">Response for a successful request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ocr_03_0031__row1067211151616"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.8.2.1.3.1.1 "><p id="ocr_03_0031__p11678112166">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.8.2.1.3.1.2 "><p id="ocr_03_0031__p1679111164">Response for a failed request</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="ocr_03_0031__p17678114169">See <a href="ocr_03_0090.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="ocr_03_0031__section6683181041618"><h4 class="sectiontitle">Error Codes</h4><p id="ocr_03_0031__p1167161113163">See <a href="ocr_03_0028.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ocr_03_0014.html">API</a></div>
|
|
</div>
|
|
</div>
|
|
|