public static final class ColorInfo.Builder extends GeneratedMessage.Builder<ColorInfo.Builder> implements ColorInfoOrBuilderColor information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.
Protobuf type google.cloud.vision.v1p4beta1.ColorInfo
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > ColorInfo.BuilderImplements
ColorInfoOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public ColorInfo build()| Returns | |
|---|---|
| Type | Description |
ColorInfo |
|
buildPartial()
public ColorInfo buildPartial()| Returns | |
|---|---|
| Type | Description |
ColorInfo |
|
clear()
public ColorInfo.Builder clear()| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
|
clearColor()
public ColorInfo.Builder clearColor()RGB components of the color.
.google.type.Color color = 1;
| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
|
clearPixelFraction()
public ColorInfo.Builder clearPixelFraction()The fraction of pixels the color occupies in the image. Value in range [0, 1].
float pixel_fraction = 3;
| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
This builder for chaining. |
clearScore()
public ColorInfo.Builder clearScore()Image-specific score for this color. Value in range [0, 1].
float score = 2;
| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
This builder for chaining. |
getColor()
public Color getColor()RGB components of the color.
.google.type.Color color = 1;
| Returns | |
|---|---|
| Type | Description |
com.google.type.Color |
The color. |
getColorBuilder()
public Color.Builder getColorBuilder()RGB components of the color.
.google.type.Color color = 1;
| Returns | |
|---|---|
| Type | Description |
com.google.type.Color.Builder |
|
getColorOrBuilder()
public ColorOrBuilder getColorOrBuilder()RGB components of the color.
.google.type.Color color = 1;
| Returns | |
|---|---|
| Type | Description |
com.google.type.ColorOrBuilder |
|
getDefaultInstanceForType()
public ColorInfo getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
ColorInfo |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getPixelFraction()
public float getPixelFraction()The fraction of pixels the color occupies in the image. Value in range [0, 1].
float pixel_fraction = 3;
| Returns | |
|---|---|
| Type | Description |
float |
The pixelFraction. |
getScore()
public float getScore()Image-specific score for this color. Value in range [0, 1].
float score = 2;
| Returns | |
|---|---|
| Type | Description |
float |
The score. |
hasColor()
public boolean hasColor()RGB components of the color.
.google.type.Color color = 1;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the color field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeColor(Color value)
public ColorInfo.Builder mergeColor(Color value)RGB components of the color.
.google.type.Color color = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Color |
| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
|
mergeFrom(ColorInfo other)
public ColorInfo.Builder mergeFrom(ColorInfo other)| Parameter | |
|---|---|
| Name | Description |
other |
ColorInfo |
| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ColorInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public ColorInfo.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
|
setColor(Color value)
public ColorInfo.Builder setColor(Color value)RGB components of the color.
.google.type.Color color = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Color |
| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
|
setColor(Color.Builder builderForValue)
public ColorInfo.Builder setColor(Color.Builder builderForValue)RGB components of the color.
.google.type.Color color = 1;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
com.google.type.Color.Builder |
| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
|
setPixelFraction(float value)
public ColorInfo.Builder setPixelFraction(float value)The fraction of pixels the color occupies in the image. Value in range [0, 1].
float pixel_fraction = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
floatThe pixelFraction to set. |
| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
This builder for chaining. |
setScore(float value)
public ColorInfo.Builder setScore(float value)Image-specific score for this color. Value in range [0, 1].
float score = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
floatThe score to set. |
| Returns | |
|---|---|
| Type | Description |
ColorInfo.Builder |
This builder for chaining. |