Images

Overlays

It is possible to generate an overlay image on the server by setting the generate_overlay parameter to true for a search or comparison call. The overlay image aligns the search and result images so they match up with each other, adjusting for crops, flips, translations, and rotations. To generate and view the overlay, simply go to the overlay URL on the MatchEngine server (e.g., https://matchengine.tineye.com/<company>/<overlay_path>). You can use this URL to link to the overlay image directly in the src attribute of an HTML img tag.

The overlay is a single image composed of a left and a right side, like the image below.

_images/sample_overlay.jpg

The left side is the original image from the collection that the searched image was matched against. The right side is the image that was searched against the collection.

By using JavaScript and CSS you can use the overlay image to “overlap” the collection image and the search image so you can easily see how the search image differs from the collection image (if at all). Mouse over the following image to see how this can be done:

The code to do this shows the left half of the overlay image to start (i.e. the collection image), and then shows the right half (i.e. the searched image) when you mouse over the image.

Viewing images

It is possible to view your collection images using the MatchEngine server and the filepath that you specified when adding the image.

Note that this feature is not meant to be a substitute for storing or viewing your images, but is useful for debugging or for use in a sample application.

Point your browser to these URLs...

... to view collection images:

/collection/?filepath=<filepath>

Example:

https://matchengine.tineye.com/<company>/collection/?filepath=path/folder/image.jpg

The method takes a size parameter if you wish to limit the size at which the image is displayed (the larger dimension will be bound); it has a default of 200px.

Example:

https://matchengine.tineye.com/<company>/collection/?filepath=path/folder/image.jpg&size=75

Cached images

The API keeps overlay images for one day, so if you wish to make use of them later, download them to your server.