你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AIVisionImageAnalysisModelFactory.CropRegion(Single, ImageBoundingBox) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.