1// Copyright 2019 Google LLC.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15
16syntax = "proto3";
17
18package google.cloud.vision.v1p4beta1;
19
20
21option cc_enable_arenas = true;
22option go_package = "cloud.google.com/go/vision/apiv1p4beta1/visionpb;visionpb";
23option java_multiple_files = true;
24option java_outer_classname = "GeometryProto";
25option java_package = "com.google.cloud.vision.v1p4beta1";
26option objc_class_prefix = "GCVN";
27
28// A vertex represents a 2D point in the image.
29// NOTE: the vertex coordinates are in the same scale as the original image.
30message Vertex {
31  // X coordinate.
32  int32 x = 1;
33
34  // Y coordinate.
35  int32 y = 2;
36}
37
38// A vertex represents a 2D point in the image.
39// NOTE: the normalized vertex coordinates are relative to the original image
40// and range from 0 to 1.
41message NormalizedVertex {
42  // X coordinate.
43  float x = 1;
44
45  // Y coordinate.
46  float y = 2;
47}
48
49// A bounding polygon for the detected image annotation.
50message BoundingPoly {
51  // The bounding polygon vertices.
52  repeated Vertex vertices = 1;
53
54  // The bounding polygon normalized vertices.
55  repeated NormalizedVertex normalized_vertices = 2;
56}
57
58// A 3D position in the image, used primarily for Face detection landmarks.
59// A valid Position must have both x and y coordinates.
60// The position coordinates are in the same scale as the original image.
61message Position {
62  // X coordinate.
63  float x = 1;
64
65  // Y coordinate.
66  float y = 2;
67
68  // Z coordinate (or depth).
69  float z = 3;
70}
71