你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CropRegion Class

Definition

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.

public class CropRegion : System.ClientModel.Primitives.IJsonModel<Azure.AI.Vision.ImageAnalysis.CropRegion>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Vision.ImageAnalysis.CropRegion>
type CropRegion = class
    interface IJsonModel<CropRegion>
    interface IPersistableModel<CropRegion>
Public Class CropRegion
Implements IJsonModel(Of CropRegion), IPersistableModel(Of CropRegion)
Inheritance
CropRegion
Implements

Properties

AspectRatio

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).

BoundingBox

The bounding box of the region.

Explicit Interface Implementations

IJsonModel<CropRegion>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<CropRegion>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<CropRegion>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<CropRegion>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<CropRegion>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to