Class ReferenceImage.Builder (2.1.4)

public static final class ReferenceImage.Builder extends GeneratedMessageV3.Builder<ReferenceImage.Builder> implements ReferenceImageOrBuilder

A ReferenceImage represents a product image and its associated metadata, such as bounding boxes.

Protobuf type google.cloud.vision.v1p4beta1.ReferenceImage

Static Methods

getDescriptor()

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

Methods

addAllBoundingPolys(Iterable<? extends BoundingPoly> values)

public ReferenceImage.Builder addAllBoundingPolys(Iterable<? extends BoundingPoly> values)

Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).

repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.vision.v1p4beta1.BoundingPoly>
Returns
TypeDescription
ReferenceImage.Builder

addBoundingPolys(BoundingPoly value)

public ReferenceImage.Builder addBoundingPolys(BoundingPoly value)

Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).

repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueBoundingPoly
Returns
TypeDescription
ReferenceImage.Builder

addBoundingPolys(BoundingPoly.Builder builderForValue)

public ReferenceImage.Builder addBoundingPolys(BoundingPoly.Builder builderForValue)

Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).

repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueBoundingPoly.Builder
Returns
TypeDescription
ReferenceImage.Builder

addBoundingPolys(int index, BoundingPoly value)

public ReferenceImage.Builder addBoundingPolys(int index, BoundingPoly value)

Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).

repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
valueBoundingPoly
Returns
TypeDescription