Partager via


AIVisionImageAnalysisModelFactory.CropRegion(Single, ImageBoundingBox) Method

Definition

Initializes a new instance of CropRegion.

public static Azure.AI.Vision.ImageAnalysis.CropRegion CropRegion (float aspectRatio = 0, Azure.AI.Vision.ImageAnalysis.ImageBoundingBox boundingBox = default);
static member CropRegion : single * Azure.AI.Vision.ImageAnalysis.ImageBoundingBox -> Azure.AI.Vision.ImageAnalysis.CropRegion
Public Shared Function CropRegion (Optional aspectRatio As Single = 0, Optional boundingBox As ImageBoundingBox = Nothing) As CropRegion

Parameters

aspectRatio
Single

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
ImageBoundingBox

The bounding box of the region.

Returns

A new CropRegion instance for mocking.

Exceptions

boundingBox is null.

Applies to