Class CropHintsParams.Builder (3.1.0)

public static final class CropHintsParams.Builder extends GeneratedMessageV3.Builder<CropHintsParams.Builder> implements CropHintsParamsOrBuilder

Parameters for crop hints annotation request.

Protobuf type google.cloud.vision.v1.CropHintsParams

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllAspectRatios(Iterable<? extends Float> values)

public CropHintsParams.Builder addAllAspectRatios(Iterable<? extends Float> values)

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.

repeated float aspect_ratios = 1;

Parameter
NameDescription
valuesIterable<? extends java.lang.Float>

The aspectRatios to add.

Returns
TypeDescription
CropHintsParams.Builder

This builder for chaining.

addAspectRatios(float value)

public CropHintsParams.Builder addAspectRatios(float value)

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.

repeated float aspect_ratios = 1;

Parameter
NameDescription
valuefloat

The aspectRatios to add.

Returns
TypeDescription
CropHintsParams.Builder

This