CropRegion Class
- java.
lang. Object - com.
azure. ai. vision. imageanalysis. models. CropRegion
- com.
Implements
public final class CropRegion
implements JsonSerializable<CropRegion>
A region at the desired aspect ratio that can be used as image thumbnail. The region preserves as much content as possible from the analyzed image, with priority given to detected faces.
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Crop |
fromJson(JsonReader jsonReader)
Reads an instance of Crop |
double |
getAspectRatio()
Get the aspect |
Image |
getBoundingBox()
Get the bounding |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static CropRegion fromJson(JsonReader jsonReader)
Reads an instance of CropRegion from the JsonReader.
Parameters:
Returns:
Throws:
getAspectRatio
public double getAspectRatio()
Get the aspectRatio property: The aspect ratio of the crop region. Aspect ratio is calculated by dividing the width of the region in pixels by its height in pixels. The aspect ratio will be in the range 0.75 to 1.8 (inclusive) if provided by the developer during the analyze call. Otherwise, it will be in the range 0.5 to 2.0 (inclusive).
Returns:
getBoundingBox
public ImageBoundingBox getBoundingBox()
Get the boundingBox property: The bounding box of the region.
Returns:
toJson
Applies to
Azure SDK for Java