Use Smart Crop to intelligently crop and resize images around prominent faces and features.
Smart Crop combines the capabilities of the Face Crop and Feature Crop transformations to automatically detect faces and important features in an image. If one or more faces are detected, Smart Crop crops around them, preserving as many complete faces as possible within the specified dimensions. If no faces are detected, Smart Crop crops around the most prominent feature(s).
To perform a Smart Crop transformation, specify your crop dimensions and select one of the following crop types:
- Fill (default): Scales the crop area to include as much of the area around the faces or features as possible, relative to the specified width and height. If width or height isn't specified, Image and Video Manager chooses a dimension to include as much of the original image as possible, resulting in a transformation equivalent to a simple resize. The Fill crop style is suitable for most use cases.
- Crop: Performs a raw crop around faces/features.
- Zoom: Scales the crop area as small as possible to fit the faces/features, relative to the specified width and height. This results in a tighter crop around prominent faces or features.
For example, if you have the following image:
and apply Smart Crop using the Fill crop style, a width of 300 pixels and a height of 800 pixels, you get the following transformed image:
Because faces were detected, but the image dimensions were too narrow to preserve more than one complete face, Image and Video Manager cropped around the most prominent face. If no faces had been detected, Image and Video Manager would've cropped around the most prominent feature(s).
If you add the IMQuery transformation to a policy, use the im variable, and select Smart Crop, you can use the query string to crop around the most prominent faces or features in an image. See Syntax and Examples for the syntax for the query string parameter.
Updated 16 days ago