Index and add an image to your collection. This method is used to populate your image collection.
The MatchEngine API can perform one add or delete operation at a time. Any extra requests submitted will be queued up for processing as slots become available.
For maximum performance images should be pre-scaled, as described under Image Limitations below. Thus, in some cases where you could use URLs, it may be better to do the download yourself, scale the image, and send it in the request. If you are using URLs, make sure that the image comes from a low latency server as the API will need to download them before indexing.
- Naming conflicts: When images are uploaded to the service, the same path is used to store it. Uploading an image with the same file path will result in the existing image being overwritten. This helps avoid duplicate entries.
- Image size: For optimal performance, uploaded images should be 600px in size in the smallest dimension. For example, 1200x800 pixels is larger than required and it will take longer to transfer this file to your MatchEngine server. It would be faster to resize this image to be 900x600 and then send it.
- Image content: Some images may not contain enough detail to be indexed effectively. For example, images that are extremely small or contain only a single color will not show up in search results.
- Image format: Accepted formats are JPEG, PNG, GIF (non-animated), BMP, and TIFF files.
In addition to the Common parameters there are:
|image||An image file object that will be added to the collection.|
|filepath (optional)||A filepath under which the image file will be added to the collection. If not supplied, the API will use the name as specified in the filename parameter of a multipart HTTP request.|
curl https://matchengine.tineye.com/<company>/rest/add/ \ -F "email@example.com"
curl https://matchengine.tineye.com/<company>/rest/add/ \ -F "firstname.lastname@example.org" \ -F "filepath=image_1.jpg"