Working with images


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 query and collection 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 MobileEngine server (e.g.,<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.


The left side is the original image from the collection that the query image was matched against. The right side is the query 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 query image so you can easily see how the query 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 query image) when you mouse over the image.

Viewing images

It is possible to view your collection images using the MobileEngine 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:



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 200 pixels.


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.