This article provides guidelines about formats, sizes, etc. of the reference images that you upload to your database, that will help optimize the image recognition performance. Bear in mind that the performance of the overall system depends mostly on the reference images.
Important: We recommend that reference images have any size from 400×300 to 640×480 pixels, and in case they are JPEGs, compression quality above 75%.
If some of your images do not fulfil the above requirements the sections below will help you decide whether you need to change your images or you can just upload them as they are.
Dimensions and aspect ratios
Important: We recommend that reference images have any size from 400×300 to 640×480 pixels.
Note that using images larger than 640×480 pixels does not help improving the results.
If you decide to resize your large images to speed up their uploading we recommend rescaling them so their shorter edge has 320 pixels.
When the shorter edge gets smaller than 300 pixels the recognition results may be sub-optimal. In fact, many of our tools, including the web panel, reject images with the shorter edge smaller than 288 pixels. You can go around this requirement by upscaling your images. However this will produce good recognition results only if the depicted objects are strongly textured.
Warning: When you rescale your images you MUST maintain their original aspect ratio (i.e. the ratio between width and height).
In most cases you do not need to worry about image aspect ratios (i.e. ratios between their widths and heights). However, if you have a very elongated object, it is a good idea to add some uniform margins in order to extend their shorter dimension — see the example of recognition of tightly cropped text logos (>7 characters).
Formats and compression
Important: We support JPEG and PNG formats.
Important: If your images are JPEGs you will get good recognition results for any compression quality from 75% to 100% (libjpeg quality measure).
Checking JPEG compression quality
We measure the JPEG compression quality according to libjpeg. Other tools, e.g. Photoshop, may use different measures. We recommend using one of two ways to inspect the JPEG compression quality according to libjpeg:
- using ImageMagick: in ImageMagick v6.2.4 and above execute command convert imagefile.jpeg -verbose info: and look for “Quality” value. In older versions try executing identify -verbose imagefile.jpeg.
- using GIMP: open and try exporting as JPEG with Advanced Options “Use quality settings from original image”.
Warning: We strongly discourage you from trying to use GIFs, even if some of our tools (e.g. the Management API) may accept them.
Color vs. grayscale
You can use grayscale images (i.e. luminance information only) without losing any recognition performance.