GET get_text

Given a list of image file paths, retrieve the associated text data from the index.

Resource URL

https://wineengine.tineye.com/<company>/rest/get_text/

Notes

The text data returned for each image will include the text lines and their location information so that you can highlight them in your images.

The locations returned by WineEngine will always refer to the image stored in the index and are provided as bounding boxes described using four corners.

Please note that if your image has solid color borders, those might be cropped out by WineEngine. In that case the locations returned will only refer to the cropped version of the image.

Each request accepts maximum 10 filepaths.

Parameters

In addition to the Common parameters there are:

Filepath

Key

Description

filepath

Text data will be returned for this filepath.

Filepaths

Key

Description

filepaths[0]

Text data will be returned for this filepath.

filepaths[n] (optional)

Text data will be returned for this filepath.

Request example

curl https://wineengine.tineye.com/<company>/rest/get_text/   \
     -d "filepath=path/folder/1.jpg"

or

curl https://wineengine.tineye.com/<company>/rest/get_text/   \
     -d "filepaths[0]=path/folder/image1.jpg"                 \
     -d "filepaths[1]=path/folder/image2.jpg"

Response examples

JSON

{
    "method": "get_text",
    "status": "ok",
    "error": [],
    "result": [
        {
            "filepath": "path/folder/image1.jpg",
            "text_lines": [
                "LOUIS JADOT",
                "2015",
                "FONDEE EN 1859",
                "BOURGOGNE",
                "PINOT NOIR"
           ],
           "text_boxes": [
               "130,84 440,89 422,140 148,134",
               "219,218 336,218 336,258 219,258",
               "79,1013 518,1003 520,1024 78,1035",
               "83,1143 523,1152 521,1233 81,1224",
               "142,1268 460,1261 462,1309 143,1316"
           ]
        },
        {
            "filepath": "path/folder/image2.jpg",
            "text_lines": [
                "Beronia",
                "RIOJA",
                "DENOMINACIÓN DE ORIGEN CALIFICADA",
                "Product of Spain",
                "TEMPRANILLO",
                "2013",
                "BOTTLED BY/MIS ENBOUTEILLE PAR",
                "Bodegas Beronia",
                "OLLAURI-ESPAÑA",
                "RE.5229-LO"
            ],
            "text_boxes": [
                "23,85 577,58 590,332 36,359",
                "238,396 404,396 404,452 238,452",
                "243,456 559,449 559,476 243,483",
                "244,481 410,481 410,508 244,508",
                "151,805 484,800 485,842 151,847",
                "269,852 373,847 374,888 270,893",
                "126,906 507,900 508,939 127,945",
                "155,944 486,946 485,998 154,995",
                "134,1003 499,994 500,1032 135,1042",
                "18,1030 88,1042 84,1063 15,1051"
            ]
        }
    ],
    "stats": {
        "time_get_text": 4.29,
        "time_total": 4.75
    }
}

XML

<?xml version="1.0" encoding="utf-8"?>
<data>
    <method>get_text</method>
    <status>ok</status>
    <error/>
    <result>
        <item>
            <filepath>path/folder/image1.jpg</filepath>
            <text_lines>
                <item>LOUIS JADOT</item>
                <item>2015</item>
                <item>FONDEE EN 1859</item>
                <item>BOURGOGNE</item>
                <item>PINOT NOIR</item>
            </text_lines>
            <text_boxes>
                <item>130,84 440,89 422,140 148,134</item>
                <item>219,218 336,218 336,258 219,258</item>
                <item>79,1013 518,1003 520,1024 78,1035</item>
                <item>83,1143 523,1152 521,1233 81,1224</item>
                <item>142,1268 460,1261 462,1309 143,1316</item>
            </text_boxes>
        </item>
        <item>
            <filepath>path/folder/image2.jpg</filepath>
            <text_lines>
                <item>Beronia</item>
                <item>RIOJA</item>
                <item>DENOMINACIÓN DE ORIGEN CALIFICADA</item>
                <item>Product of Spain</item>
                <item>TEMPRANILLO</item>
                <item>2013</item>
                <item>BOTTLED BY/MIS ENBOUTEILLE PAR</item>
                <item>Bodegas Beronia</item>
                <item>OLLAURI-ESPAÑA</item>
                <item>RE.5229-LO</item>
            </text_lines>
            <text_boxes>
                <item>23,85 577,58 590,332 36,359</item>
                <item>238,396 404,396 404,452 238,452</item>
                <item>243,456 559,449 559,476 243,483</item>
                <item>244,481 410,481 410,508 244,508</item>
                <item>151,805 484,800 485,842 151,847</item>
                <item>269,852 373,847 374,888 270,893</item>
                <item>126,906 507,900 508,939 127,945</item>
                <item>155,944 486,946 485,998 154,995</item>
                <item>134,1003 499,994 500,1032 135,1042</item>
                <item>18,1030 88,1042 84,1063 15,1051</item>
            </text_boxes>
        </item>
    </result>
    <stats>
        <time_get_text>4.29</time_get_text>
        <time_total>4.75</time_total>
    </stats>
</data>