Reference documentation and code samples for the Cloud Vision V1 Client class CropHintsParams.
Parameters for crop hints annotation request.
Generated from protobuf message google.cloud.vision.v1.CropHintsParams
Namespace
Google \ Cloud \ Vision \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ aspect_ratios
array
Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.
getAspectRatios
Aspect ratios in floats, representing the ratio of the width to the height
of the image. For example, if the desired aspect ratio is 4/3, the
corresponding float value should be 1.33333. If not specified, the
best possible crop is returned. The number of provided aspect ratios is
limited to a maximum of 16; any aspect ratios provided after the 16th are
ignored.
Aspect ratios in floats, representing the ratio of the width to the height
of the image. For example, if the desired aspect ratio is 4/3, the
corresponding float value should be 1.33333. If not specified, the
best possible crop is returned. The number of provided aspect ratios is
limited to a maximum of 16; any aspect ratios provided after the 16th are
ignored.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Vision V1 Client - Class CropHintsParams (2.0.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.3 (latest)](/php/docs/reference/cloud-vision/latest/V1.CropHintsParams)\n- [2.0.2](/php/docs/reference/cloud-vision/2.0.2/V1.CropHintsParams)\n- [1.10.3](/php/docs/reference/cloud-vision/1.10.3/V1.CropHintsParams)\n- [1.9.4](/php/docs/reference/cloud-vision/1.9.4/V1.CropHintsParams)\n- [1.8.0](/php/docs/reference/cloud-vision/1.8.0/V1.CropHintsParams)\n- [1.7.6](/php/docs/reference/cloud-vision/1.7.6/V1.CropHintsParams)\n- [1.6.8](/php/docs/reference/cloud-vision/1.6.8/V1.CropHintsParams) \nReference documentation and code samples for the Cloud Vision V1 Client class CropHintsParams.\n\nParameters for crop hints annotation request.\n\nGenerated from protobuf message `google.cloud.vision.v1.CropHintsParams`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Vision \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getAspectRatios\n\nAspect ratios in floats, representing the ratio of the width to the height\nof the image. For example, if the desired aspect ratio is 4/3, the\ncorresponding float value should be 1.33333. If not specified, the\nbest possible crop is returned. The number of provided aspect ratios is\nlimited to a maximum of 16; any aspect ratios provided after the 16th are\nignored.\n\n### setAspectRatios\n\nAspect ratios in floats, representing the ratio of the width to the height\nof the image. For example, if the desired aspect ratio is 4/3, the\ncorresponding float value should be 1.33333. If not specified, the\nbest possible crop is returned. The number of provided aspect ratios is\nlimited to a maximum of 16; any aspect ratios provided after the 16th are\nignored."]]