Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Smart-cropped thumbnails

A thumbnail is a reduced-size representation of an image. Thumbnails are used to represent images and other data in a more economical, layout-friendly way. Azure Vision 3.2 API uses smart cropping to create intuitive image thumbnails that include the most important regions of an image, with priority given to any detected faces.

Azure Vision thumbnail generation algorithm works as follows:

  1. Remove distracting elements from the image and identify the area of interestβ€”the area of the image in which the main object(s) appears.
  2. Crop the image based on the identified area of interest.
  3. Change the aspect ratio to fit the target thumbnail dimensions.

Area of interest

When you upload an image, Azure Vision API analyzes it to determine the area of interest. It can then use this region to determine how to crop the image. The cropping operation, however, will always match the desired aspect ratio if one is specified.

You can also get the raw bounding box coordinates of this same area of interest by calling the areaOfInterest API instead. You can then use this information to modify the original image however you wish.

Smart-cropped thumbnail examples

The generated thumbnail can vary widely depending on what you specify for height, width, and smart cropping, as shown in the following image.

πŸ‘ A mountain image next to various cropping configurations

The following table illustrates thumbnails defined by smart-cropping for the example images. The thumbnails were generated for a specified target height and width of 50 pixels, with smart cropping enabled.

Image Thumbnail
πŸ‘ Outdoor Mountain at sunset, with a person's silhouette
πŸ‘ Thumbnail of Outdoor Mountain at sunset, with a person's silhouette
πŸ‘ A white flower with a green background
πŸ‘ Vision Analyze Flower thumbnail
πŸ‘ A woman on the roof of an apartment building
πŸ‘ thumbnail of a woman on the roof of an apartment building

Use the API

The generate thumbnail feature is available through the Get Thumbnail and Get Area of Interest API. You can call this API through a native SDK or through REST calls.


Feedback

Was this page helpful?

Additional resources