36
LTU engine/server Description & User Guide Making sense of visual content. Last update : 2012/08/19 16:10 1/36 LTU engine/server Description & User Guide 1. Introduction: Visual Search Images finding images: LTU engine is the foundation for visual search: image matching, similarity search, and color search. Visual search is using one image to find other images. Visual search based upon the content of an image, rather than based on textual information. Two key technologies of visual search are image description and image search. Image description (Indexation): The first step toward making an image searchable is to create a descriptor of the image content. LTU engine computes a visual signature for every image that describe its visual content in terms of color, shape, texture and many higher order visual features. These descriptors are also called image DNAs. Image search: Image search is the comparison of one image signature with another, or with millions of other signatures. LTU's proprietary architecture includes a special comparison technology by which an image signature can be compared at extremely high speed with other image signatures. The core data for LTU engine is the signature, also called the image DNA, not the image itself. Image signatures are presented in the “Create Application” section of the “Administrative Interface” guide below. These principal functionalities are packaged in LTU engine, which provides the components necessary for creating and managing visual search applications, including JSON API and a comprehensive Administrative Interface.

LTU engine/server Description & User Guide

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 1/36

LTU engine/server Description & User Guide

1. Introduction: Visual Search

Images finding images: LTU engine is the foundation for visual search: image matching,similarity search, and color search.

Visual search is using one image to find other images. Visual search based upon the content of animage, rather than based on textual information.

Two key technologies of visual search are image description and image search.

Image description (Indexation): The first step toward making an image searchable is to create adescriptor of the image content. LTU engine computes a visual signature for every image thatdescribe its visual content in terms of color, shape, texture and many higher order visual features.These descriptors are also called image DNAs.

Image search: Image search is the comparison of one image signature with another, or withmillions of other signatures. LTU's proprietary architecture includes a special comparisontechnology by which an image signature can be compared at extremely high speed with otherimage signatures.

The core data for LTU engine is the signature, also called the image DNA, not the image itself.Image signatures are presented in the “Create Application” section of the “AdministrativeInterface” guide below.

These principal functionalities are packaged in LTU engine, which provides the componentsnecessary for creating and managing visual search applications, including JSON API and acomprehensive Administrative Interface.

Page 2: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 2/36

2. Release note

Release Note - What's new in LTU engine 6 : New features

LTU engine Version 6 has the following new features

New Feature DetailsNew administrativeinterface New interface to manage the LTU engine server and applications

Easy applicationmanagement

Applications may be managed directly from the Admin Interface:enable or disable applications, edit advanced parameters ofapplications,rename applications

Manage, create and reloadapplications (withoutsystem restart)

Applications may be managed without restarting LTU engine.

Statistical toolsComprehensive statistics of general system utilization as welldetails of each individual applicaion. Statistics are available ingraphic and numeric formats, and statistics may be exported in.csv files for further analysis.

View all queries effected onLTU engine

The administrative interface includes visual logs of all queries,displaying both queries and results.

Matching zone Displaying the matching zone permits visualization of the commonvisual content in the query and reference images.

Page 3: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 3/36

Release Note - What's new in LTU engine 6: New Architecture

LTU engine 6 has the following changes in architecture :

Architecture DetailsFaster response time for mobileapplications

Mobile configuration for optimized response time down to 500ms whatever the database size.

Increased scalabilityLTU engine is now organized in many separate processes andservices. That allows capacity adjustments without restartingthe entire system.

New JSON API for systemadministation

Every LTU administration action (query) can be now donedirectly via the new API.

New JSON API for imagemanagement and search

No need to use any SDK, applications may be plugged directlyon the JSON API.

External database manager nolonger necessary

LTU image signatures (image DNA) are stored by LTU engineserver in an integrate database system; it is no longernecessary to install an external database manager.

3. System requirements

Supported versions

LTU engine server is a full 64-bit system and is supported in the following environments:

Operating System Distribution VersionLinux Debian 6.0Linux Redhat 6.0Windows Server 2008

LTU engine Server 6 uses now an internal dna storage system. An external database manager is nolonger necessary.

Ressources needed

CPU: Dual Core CPU minimum●

Mem: 2Go minimum without counting the memory needed by your applications DNA (in the sizing●

provided by [email protected]).Hard drive: 10Go minimum without image storage.●

Page 4: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 4/36

4. GlossaryApplication: An application database that contains image DNA’s (the image database),●

meta-information and various settings (including the functionality the application was created for– matching or similarity).Application Key: Each application has a unique application key that is used to access the●

application.Bounce: Taking a single DNA from an image database and comparing it to all DNA in the same●

image database.Color Weight: Using LTU technologies’ similarity algorithm you can control the return results●

based on color weight. Using color weight, the search can be weighted on the colors of the entireimage, entirely on the shapes of the image or any combination of the two.Duplicate & Clone: A duplicate image is one that is where exactly all pixels have the same value●

as in the comparison image, any modification such as coloring or resizing makes the image aclone.DNA & Signature: When an image has been indexed a binary string is generated called an●

image DNA or signature.Global Matching: A global match detects if two images are exactly or very nearly the same.●

Enrollment: Reference to the entire process of taking an image, indexing it to generate a DNA,●

storing the DNA and keywords, generating and storing a thumbnail and reference image to anapplication.Image Database: Each application has its own database storage, in which a DNA is stored●

Image DNA Type: Each DNA is designed for a specific feature (matching or similarity).●

Image_ID: The image_id is a unique key to the client’s image within an application and for a●

client. The image_id can be thought of as a foreign key to the client’s database. The system willnot accept duplicate image_id’s.Indexation: The act of processing an image by an algorithm to generate a DNA.●

Keywords: Each image entity may have a set of keywords (string) associated with it. These●

keywords are helpful for aiding and enhancing searches. Note: keywords may be duplicatedacross multiple images within a single image database but should not be duplicated on one image(eg. acceptable ‘red,dog,bed’, unacceptable ‘red,red,red,dog,bed’).Local Matching: Local matching is able to find matching sub-sections of two images or images of●

the same object.

Page 5: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 5/36

5. Administrative Interface

Introduction: LTU engine Administrative Interface

Both LTU engine /server and LTU engine /ON demand share the same Administrative Interface.

However, there are certain differences in

feature availability●

API syntax●

In this document, these differences are noted by text marked with this symbol:

Page 6: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 6/36

Administrative Interface: LTU engine/server

Creating new and managing existing applications are possible via the Administrative Interface ofLTU engine/server. However, application paramenters should be modified only as instructed by LTUSupport.

Administrative Interface: LTU engine/ON demand

Monitoring the performance of applications and authorizing IP access have been the primarypurpose of the LTU engine/ON demand administrative interface.

The creation and configuration of applications remains the responsibility of LTU Support.

New features were added to the Administrative Interface in July 2012: These include the ImageManagement tab which is detailed in this document.

Also, Visual Query Logs may be activated on individual applications (to activate Visual Query Logs,please contact LTU Support.

Notalble Features Common to Both

Image Management - Browse Images●

Image Management - Bounce Search with Display of Matching Zones●

Image Management - Batch Processes via the Administrative Interface●

Statistics - Numeric and Graphical●

Statistics - Visual Query Logs●

Page 7: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 7/36

Applications

Manage Applications - Applications Dashboard

The Dashboard displays information about all applications (Active and Inactive)

Active Applications Includes graphic indicators of the status of each application.●

Inactive Applications Information on applications which are still present on the disk storage●

system but are not loaded into memory, thus not available for queries

Get Image ID's For creation and download of a .csv file containing the image ID's and keywords●

for all images in the application.

Application Parameters - Display and Update

Reminder: Application parameters should not be changed unless advised by LTU support.

Name: Application Name may be changed here at any time without affecting operations.●

Application names should contain no accents or special characters. Spaces are permitted.Maximum name length: 256 charcters.

Status: Unchecking this box will make the application Inactive. Image signatures are unloaded●

from system memory.

Application Search DNA: Different from the “Application DNA”, the “Application Search●

Page 8: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 8/36

DNA” is a parameter for certain types of Image Matching applications. It functions on externalimages, creating a larger, more detailed image signature, which is effective in applications wherequery images may be of varying quality, such as mobile applications.

For information on signatures, see section Create Application

Color Weight Applicable only to “Image Similarity” applications.”Color Weight” is the default●

color weight used when not specified in the query (SearchImageByDna or SearchImageByUpload).Default: “50” (balance between Color and Shape). Weighted for form: “0”. Weighted for color:'100”.

Save query logs days This affects the Batch search reports as well as invididual queries.●

Number of Results: Default number of results when not specified in the query. Applies to API●

queries as well as to queries via the Admin Interface (number of bouce results, displayed, forexample).

Retrieval Threshold: Threshold on retrieval results. Image with a score superior to this●

threshold will NOT be returned. -1 means no threshold.

Comments: Any comments describing specifics of the application.●

Application Status

Last Add: Time elapsed since last AdImage, whether effected via the API or via the Admin●

Interface.

Last Search: Time elapsed since last SearchImage, whether effected via the API or via the Admin●

Interface.

Number of Kimas: Number of kima processes associated with this application. This number is●

automtically adjusted by the system may not be modified via the Admin Interface.

Images: Total number of images in the application.●

Keywords: Since individual images may have multiple keywords, this number may be larger than●

the number of images.Reminder - for images enrolled via the Admin Interface (Image Management, batch process, Addimages) keywords are automatically generated if the submitted zip file is organized bysubdirectories. Keywords are generated for all levels of the file hierarchy.

Also see the API Methods section (AddImage and SearchImage…) for additional information aboutkeywords.

Advanced Management Status Information

Update messages and codes: Values are:●

0: the application has never been updated by the manager process 1: the application is currentlyqueued for update 2: an update is currently running for the application 3: an update has alreadybeen run for this application (normal state) 4: an update failed

Next update: Applications are automatically when necessary●

Last generation: “Generation” means update of the application.●

Page 9: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 9/36

Advanced Actions: Update, Rebuild, Reload

Unless instructed by LTU support, it is generally unnecessary to perform these actions.

Note: None of the following actions deletes data from disk storage.

These actions concern the reloading of data elements into system memory. An application istemporarily disabled during the execution of these functions.

Update Application: Adds new elements, such as new image signatures, to system memory.●

However, this is done automatically during standard update procedures, such as AddImage oraddImageBatch.

Rebuild Application: Unload and Reload: unloads the application from system memory, and●

completely reloads the application from the database.

Reload Configuration As distinguished from application content (which is updated or reloaded●

by Update and Rebuild Application), this action reloads application parameters. However, this isdone automatically “Apply Modifications” is selected after application parameters are modified.

Display: Other application information

Creation Date: Display only.●

Application Key: Display only. The application key is generated at aplication creation and may●

not be changed.

Public Key: While the Application Key is necessary for effecting API queries, the Public Key is●

necesary for accessing content elements stored on disk, such as images.For example:http://hostaddress:8888/image/E3D57368JVu5qE6m/4bb81872d60245474b97f50076fb4a80“E3D57368JVu5qE6m” is the public key; “4bb81872d60245474b97f50076fb4a80” is the imagechecksum (MD5).

Application DNA Type: Display only. Displayed in long form: 70001000 = 70.1.1.●

Application DNA type cannot be changed once an application is created. To change a DNA type fora set of images, a new application must be created, and the images must be indexed in the newapplication.

Application Type: Display only. The category (Image Matching, Image Similarity) of the●

Application Type selected at application creation.

Folder path: This is the location of the images of an application.●

Database Location: For information only; significant only for special configurations involving a●

database on a separate server.

Retrieval Threshold: Display only of the retrieval threshold currently in effect. May be modified●

via the “Application parameters” form, if so advised by LTU support.

Page 10: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 10/36

Create Application

LTU engine/server only. For LTU engine/ON demand, applications are created by LTU support.

Name: Application names should be limited to fewer than 256 characters, with no accents or●

special characters. Spaces are permitted.

Application Type: The choice of “Image matching” or “Image similarity” determines which●

signatures will be displayed as available options for the application.

Application DNA: Explained here following:●

Matching Signatures

Signature ID OptionsSignatureSize (bytes)In Memory

Use and Characteristics

62.1.0 3900 Media intelligence (Special Use) - with rotationinvariance

65.0.0 3900Media intelligence Recommended Signature-high speed indexation and retrieval in largeapplications.

70.1.1 AsymetricRetrieval 7500 Mobile Applications (Special Use):

Applications Larger than 100k images

70.1.2 AsymetricRetrieval 7500 Mobile Applications: Recommended Signature

Asymetric Retrieval: Asymetric Retrieval is automatically activated for applications whosesignature includes the option. Asymetric Retrieval applies to external queries (SearchByUpload): alarge temporary signature (not stored in the application) is calculated for the external query image,which is then compared with the application images.

Page 11: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 11/36

Similarity Signatures

Signature ID OptionsSignatureSize (bytes)In Memory

Use and Characteristics

2.0.0segmentation

query weightingColor/Form

2956Overall image similarity, queries may beweighted in favor of shapes or of colors;especially effective on images with similarcolors.

4.0.0 query weightingColor/Form 1340 Recommended Signature for image

similarity search

Color Signatures

Signature ID OptionsSignature Size(bytes)In Memory

Use and Characteristics

8.0.0 query weightingColor/Form 897 Dominant colors signature

8.1.0 query weightingColor/Form 897 Same as 8.0 but with uniform

background removal

Page 12: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 12/36

Image Management

Browse Images

The Browse Images feature of Image Managment allows a display of all images present in anapplication.

Images are arranged chronologically (images last added are displayed first).

Page controls allow browsing the entire database

Browse Images - Search Image

Any image selected via the Browse Images page may be used as a search query:

Clicking on a result image shows a display of the matching zone.

Page 13: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 13/36

Run Batch Process

Add Images

For the selected application, images may be added by uploading a zip file. Filenames must beunique across the zip file, since the filename is used as the image id.

Keywords: Keywords may be associated with images added via this process. Folder names areused as keywords for the images. This may include multiple levels. In the example below, duringindexation, images are assigned keywords according to where the image files are found in thefolder directory tree.

A batch add process may be designated by a Report Name. The report is timestamped and may beaccessed later to know the number of images enrolled.

Page 14: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 14/36

Search Images

Batches of images may be submitted as queries. The batch search may be designated by a ReportName. The batch search report maybe accessed later, and includes displays of the query imagesand the results.

Previous Batch Processes

Batch processes described above are accessed via these links.

Page 15: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 15/36

Advanced Usage: Test API Queries

This page provides a simple way to understand the functioning of the principal queries. For theselected application, query parameters may be entered via the screen interface. The display thenshows both the json response and,if applicable, the associated images.

Page 16: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 16/36

Statistics

The Statistics tab gives access to numeric and graphical measures of system utilization.

It also provides access to Visual Query Logs, which permit the viewing of all search querieseffected on the system. The logs display the query image and the results, ranked according toproximity score.

For applications using one of the Matching signatures, the Query Logs view permits the viewing ofteh “Matching Zone”. Clicking on any one of the result images displays the Matching Zone for thequery image and the result image:

Page 17: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 17/36

Documentation

The online version of this documentation is accessed via the Documentation tab.

Page 18: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 18/36

6. API

Introduction, LTU engine API's

The principal API's are used for

Image Management (add and delete images: AddImage; DeleteImage)●

Image Search (retrieving images: SearchImageByUpload; SearchImageById; SearchImageByDna;●

SearchImageByKeywords)

Special Use API's are used for:

Status Information on Images (GetImageByID - exists in two forms)●

Status Information on Applications (GetApplicationStatus - exists in two forms)●

Status Information on Tasks (GetTaskStatus - for asynchronous applications)●

API's - Two Distinct Categories: MODIFY & QUERY

All LTU engine queries fall into one of two general API categories: MODIFY or QUERY.

For LTU engine/ON demand, the url of the query examples given in the following pages shouldbe modified as follows :

MODIFY - https://api.ltu-engine.com/v2/ltumodify/json/●

QUERY - https://api.ltu-engine.com/v2/ltuquery/json/●

For LTU engine/server

MODIFY - addressed via port 7789●

QUERY - addressed via port 8080●

API Category Port ExampleModify 7789 http://hostaddress:7789/api/v2.0/ltumodify/json/AddImageQuery 8080 http://hostaddress:8080/api/v2.0/ltuquery/json/SearchImageByUpload

Some LTU engine API queries exist in two versions (MODIFY & QUERY), discussed below under“Special USE API's”.

The LTU engine API is accessible over the HTTP protocol.

Page 19: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 19/36

LTU engine requires a GET or a POST request as input, and returns an HTTP response with theapplication/json mimetype, which contains the response serialized as a JSON string.

Example:

GEThttp://localhost:8080/api/v2.0/ltuquery/json/SearchImageById?application_key=j6hcA7bwb1jcF8grn6msWNoziUSbXWab&image_id=myimage.jpg

JSON response

{ "images":[ { "keywords":["office"], "score":0, "id":"TO-018.jpg", "result_info":"{ "category" : "LOCALMA..." }], "status": { "message":"No error", "code":0 }, "nb_results_found":1}

In this documentation, you will find a list of all API methods.

Each section will :

quickly explain what the method does.●

define what type of HTTP request is accepted (GET, POST or both).●

define each parameter the method takes as input, its type, valid values, and whether it is●

mandatory or optional.give an example response, with comments.●

Some notions are common to quite a few API methods :

application key : it is a unique identifier for an application. It needs to be present in ALL your LTU●

engine requests.image id : it is a unique identifier of an image inside an application. When adding an image, you●

provide an image id. The results of searches in a LTU engine application will be image ids.

Page 20: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 20/36

Principal API's: Add & Delete Images

The modify API is usually exposed on http://localhost:7789/api/v2.0/ltumodify/json

AddImage

Request type : POST●

Parameters :●

application_key : string.❍

image_id : string. The unique identifier of the image.❍

image_content : binary. the content of the image file (the raw array of bytes in the image).❍

dna : binary. a byte array representing the precomputed DNA for the image. Note that you are❍

supposed to provide at least image_content or dna, but never both.keywords : strings. (can be repeated within the request) : one or more keywords that will be❍

associated to this image. See syntax below.

Simple example, curl, adding an image with two keywords (a,b):●

curl -sL -F “[email protected]” 'http://hostaddress:7789/api/v2.0/ltumodify/json/AddImage?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI&image_id=pinpin&keywords=a&keywords=b'JSON response

{ "status": { "message":"Image added to the reference database", "code":0 }, "task_id":0}

Page 21: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 21/36

DeleteImage

Request type : GET●

Parameters :●

application_key.❍

image_id : a string. The unique identifier of the image.❍

Simple example, curl:

curl -sL 'http://hostaddress:7789/api/v2.0/ltumodify/json/json/DeleteImage?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI&image_id=pinpin'JSON response

{ "status": { "message":"Image deleted from the reference database", "code":0 }, "task_id":0}

Page 22: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 22/36

Principal API's: Search Images

The modify API is usually exposed on http://localhost:7789/api/v2.0/ltuquery/json

There are 4 main methods to run search queries :

SearchImageByUpload●

SearchImageByDna●

SearchImageById●

SearchImageByKeywords●

All of these search methods have parameters in common. They are described here :

Common Parameters

Parameter Description

keywords Restrict the search to a list of keywords. Images that do not have these keywordswill be discarded in the search.

color_weightApplicable only to “Image Similarity” applications.”Color Weight” is the default colorweight used when not specified in the query(SearchImageByDna orSearchImageByUpload). Default: “50” (balance between Color and Shape).Weighted for form: “0”. Weighted for color: '100”.

nb_resultsReturn at most this many result images, never more. Even if there are 100matching images, setting nb_results means the result will contain only ten images.They will be the ten images with the best scores if starting_index is 0.

starting_indexDo not return results starting with the best score, but with the given index in theresults. For example, setting starting_index to 10 will return images starting withimage that has the 11th score.

ids_list Restrict the search to the images in this list.

Page 23: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 23/36

SearchImageByUpload

Runs an image search on an application, using an uploaded image as the query.●

Request type : POST●

Required Parameters :●

application_key❍

image_content : The contents (raw array of bytes) of the request image.❍

Optional Parameters :●

keywords: A list of keywords to which the search should be restricted❍

color_weight. (Similarity Search only) Uses application default color_weight if parameter not❍

provided.starting_index.❍

nb_results.❍

ids_list.❍

Simple example, curl:

curl -sL -F “[email protected]” 'http://hostaddress:8080/api/v2.0/ltuquery/json/SearchImageByUpload?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI'

JSON response

{ "images":[ { "keywords":[], "score":0, "id":"some_image.jpg", "result_info":"" }, { "keywords":[], "score":0.719954, "id":"some_other_image.jpg", "result_info":"" }], "status": { "message":"No error", "code":0 }, "nb_results_found":100}

Page 24: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 24/36

SearchImageById

Runs an image search on an application, taking an image from the database as the query.●

Request type : GET●

Required Parameters :●

application_key●

image_id : The id of the query image.●

Optional Parameters :●

keywords: A list of keywords to which the search should be restricted●

color_weight. (Similarity Search only) Uses application default color_weight if parameter not●

provided.starting_index.●

nb_results.●

ids_list.●

\\Simple example, curl:

curl -sL 'http://hostaddress:8080/api/v2.0/ltuquery/json/SearchImageById?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI&image_id=pinpin'

JSON response

{ "images":[ { "keywords":[], "score":0, "id":"some_image.jpg", "result_info":"" }, { "keywords":[], "score":0.719954, "id":"some_other_image.jpg", "result_info":"" }], "status": { "message":"No error", "code":0 }, "nb_results_found":100}

Page 25: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 25/36

SearchImageByDna

The equivalent of a SearchImageByUpload, but where the DNA is precomputed●

on the client, and sent directly, without sending the image.

Request type : POST●

Required Parameters :●

application_key❍

dna : The DNA of the image.❍

Optional Parameters :●

keywords: A list of keywords to which the search should be restricted❍

color_weight. (Similarity Search only) Uses application default color_weight if parameter not❍

provided.starting_index.❍

nb_results.❍

ids_list.❍

For information concerning use of pre-computed DNA's, please contact LTU support.

JSON response

{ "images":[ { "keywords":[], "score":0, "id":"some_image.jpg", "result_info":"" }, { "keywords":[], "score":0.719954, "id":"some_other_image.jpg", "result_info":"" }], "status": { "message":"No error", "code":0 }, "nb_results_found":100}

Page 26: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 26/36

SearchImageByKeywords

Returns all image ids that contain all keywords in a list.●

Request type : POST●

Required Parameters :●

application_key❍

keywords.❍

Optional Parameters :●

keywords: A list of keywords to which the search should be restricted❍

color_weight. (Similarity Search only) Uses application default color_weight if parameter not❍

provided.starting_index.❍

nb_results.❍

ids_list.❍

Simple example, curl, keywords (a,b):curl -sL 'http://hostaddress:8080/api/v2.0/ltuquery/json/SearchImageByKeywords?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI&keywords=a&keywords=b'

JSON response

{ "images":[ { "keywords":['keyword'], "score":0, "id":"some_image.jpg", "result_info":"" }, { "keywords":['keyword'], "score":0.719954, "id":"some_other_image.jpg", "result_info":"" }], "status": { "message":"No error", "code":0 }, "nb_results_found":100}

Page 27: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 27/36

Color Search API's

The Color Search API's apply only to applications created as “Color similarity” application types.

GetImageColorsById

This query identifies the dominant colors present in an image.

Request type : GET●

Required Parameters :●

application_key❍

image_id❍

Optional Parameters :None●

Simple example, curl:

curl -sL 'http://hostaddress:8080/api/v2.0/ltuquery/json/GetImageColorsById?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI&image_id=pinpin'JSON response

{ "status": { "message":"", "code":0 },

"colors":["F2F2F2@94","A9B5B6@2","EAA453@1","D5C0A3@1","2B9755@1","A0C99A@1"]}

Page 28: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 28/36

GetImageColorsByUpload

This query identifies the dominant colors present in an uploaded image.

Request type : GET●

Required Parameters :●

application_key❍

image_content: the path to the image to be uploaded.❍

Optional Parameters :None●

Simple example, curl:

curl -sL -F “[email protected]” 'http://hostaddress:8080/api/v2.0/ltuquery/json/GetImageColorsByUpload?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI'

JSON response

{ "status": { "message":"", "code":0 },

"colors":["B9A595@24","71715A@20","E1DFDB@12","494938@10","1E1B12@7","946C57@5","030203@5","0A0915@3","866939@3","0B0B07@2","5B3E26@2","3C2909@2","CAB978@1","B79439@1","382911@1","150E14@1","6E6076@1"]}

Page 29: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 29/36

SearchImageByColors

Request type : GET●

Required Parameters :●

application_key❍

colors (array of strings) as hex value (see syntax below). It is possible to add target weights for❍

color (FFFFFF@50 would search for colors of which 50% of pixels are white (FFFFFF).Optional Parameters :●

keywords (array of strings)❍

starting_index (integer)❍

nb_results (integer)❍

ids_list (string)❍

Simple example, curl:

curl -sL 'http://hostaddress:8080/api/v2.0/ltuquery/json/SearcImageByColors?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI&colors=FF6633&colors=FF99'

JSON response:

{ "images":[ { "keywords":["Seurat"], "score":0.741319597, "id":"Sunday_Afternoon_Island_G...", "result_info":"" }], "status": { "message":"No error", "code":0 }, "nb_results_found":1}

Page 30: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 30/36

GetPalette

http://127.0.0.1:8080/api/v2.0/ltuquery/json/GetPalette

Method: GET

Request type : GET●

Required Parameters :●

application_key❍

Optional Parameters :●

colors (array of strings) as hex value (Returns palette of all images which contain these colors).❍

keywords (array of strings)❍

nb_colors (integer):❍

ids_list (string):❍

Simple example, curl:http://127.0.0.1:8080/api/v2.0/ltuquery/json/GetPalette

curl -sL 'http://hostaddress:8080/api/v2.0/ltuquery/json/GetPalette?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI&colors=FF6633&colors=FF99'

{ "status": { "message":"", "code":0 },

"colors":["735238","8F938E","2D5E95","382711","393126","846834","C3973A","CFB076","E9EAEB","943112","AA834F","D91E25","090A05","0A0E30","B15A4A"], "image_count":[5,4,3,3,3,3,3,3,3,2,2,2,1,1,1]}

Page 31: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 31/36

Special Use API's

Image Fine Comparison

Not available on LTU engine/ON demand

Fine comparison is designed to provide additional details on the results of query and referencematches using LTU’s image matching functionality. The fine image comparison feature providesvisual feedback about matched images, pinpointing where the subtlest differences are located.

Fine comparison also provides a numeric score to quantify the differences between the two images.

Fine comparison is used to: Automate the identification of differences between two matchingimages R Visually highlight the differences between two images.http://hostaddress:8080/api/v2.0/ltuquery/json/FineComparison

Request type : POST●

Required Parameters :●

application_key❍

ref_image❍

query_image❍

The reference image and the query image are base64 encoded.

Simple curl example:

curl -F “[email protected]” -F “[email protected]” “http://hostaddress:8080/api/v2.0/ltuquery/json/FineComparison?application_key=VmLGHUj9yXA731RD0Hzp9svWCb5MtMY1”

JSON response:

{ "ref_image": "base 64 encoded diff on the reference image", "query_image": "base 64 encoded diff on the query image", "score": 1.2381811141967773, "status": { "message": "", "code": 0 }}

Page 32: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 32/36

GetApplicationStatus - QUERY version

Returns the status of an application (how many images are loaded, etc.)●

Request type : GET●

Required Parameter: application_key●

Simple curl example:curl -sL 'http://hostaddress:8080/api/v2.0/ltuquery/json/GetApplicationStatus?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI'JSON response

{ "status": { "message": "No error", "code": 0 }, "nb_loaded_images": 227}

GetApplicationStatus - MODIFY version

Returns the status of an application (wether it is correctly loaded, etc.)●

Request type : GET●

Required Parameter : application_key●

Simple curl example:curl -sL 'http://hostaddress:7789/api/v2.0/ltumodify/GetApplicationStatus?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI'

JSON response

{ "status": { "message": "No error", "code": 0 }, "synchronous_mode": "True", "application_db_status": "available", "main_db_status": "available"}

Page 33: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 33/36

GetImageById - QUERY version

Returns the image that has the given unique id. Request type : GET●

Parameters : application_key, image_id●

JSON response

{ "status": { "message": "No error", "code": 0 }, "image": { "keywords": ["keyword"], "score": 0, "id": "COSMOS00145488_000001.jpg", "result_info": "" }}

GetImageById - MODIFY version

Returns information about an added image. Request type : GET●

Parameters : application_key, image_id●

Simple example, curl:curl -sL 'http://hostaddress:8080/api/v2.0/ltuquery/json/GetImageById?application_key=PXly9fRUfUt0oizKTcmpzFS8AAtqrTgI&image_id=pinpin'JSON response

{ "status": { "message": "No error", "code": 0 }, "image": { "keywords": [ "some_keyword" ], "score": 0, "id": "da97e15e6b2faa06b1cd3708bf52ee1e.jpg", "result_info": "" }}

Page 34: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 34/36

GetTaskStatus

* Returns the status of an addition or removal task. * Note that this is valid only for asynchronousapplications. Synchronous applications will add the image directly in the database, so that there isno need to monitor the task status for adds and deletes.

Request type : GET●

Parameters :●

application_key.❍

task_id : an integer (as returned by AddImage or DeleteImage).❍

JSON response

{ "status": { "message": "No error", "code": 0 }, "task_status": "processed", "task_status_code": 0, "task_id": 2, "task_status_message": ""}

Page 35: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 35/36

7. Installling and Configuring

Install Procedures

Required Files

The two essential software components for installing LTU engine are:

LTU engine software: delivered as a .zip file (same file for both Linux and Windows).●

LTU license file: a machine-specific license key necessary for installing and activating the●

software.

Installation Steps

Unzip the installation software to a temporary directory.●

Copy the license file to the same temporary directory●

Linux: logged in as “root”, in the temporary directory, execute the script install.sh●

Windows: logged in as Administrator, from a command line window in the temporary directory,●

execute the script install.bat

All system components will be installed and lauched via this single command.

Start-Stop-Status-Restart

Linux: logged in as root: /etc/init.d/ltud [option]options: start, stop, status all, restart

Windows: logged in as Administrator: The service “ltuengine” may be stopped and restarted viathe Services panel of the Windows Server Task Manager.

Page 36: LTU engine/server Description & User Guide

LTU engine/server Description & User GuideMaking sense of visual content.

Last update : 2012/08/19 16:10 36/36

8. Image Formats Supported

Image Formats Supported

The following image formats may be submitted to LTU engine for indexation (added to anapplication image database) or search:

PNG●

GIF●

JPEG, JPG●

BMP●

For all other image file formats, it is necessary to convert them to one of the above beforeindexation or search on LTU engine.

Recommended indexation limitations:

Recommended dimension size of images to be indexed is is 512×512 pixels●

Minimum recommended resolution for a supplied image is 200×200 pixels●

Recommended search limitations:

Recommended minimum resolution for images submitted as search queries is 250×250 pixels●

Column 1 Column 2Line 1 Line 1

From:http://doc.ltu-engine.com/ - LTU documentation

Permanent link:http://doc.ltu-engine.com/engine/6.0/user-guide

Last update: 2012/08/19 16:10