1// Copyright 2022 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
15syntax = "proto3";
16
17package google.cloud.vision.v1;
18
19option cc_enable_arenas = true;
20option go_package = "cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb";
21option java_multiple_files = true;
22option java_outer_classname = "GeometryProto";
23option java_package = "com.google.cloud.vision.v1";
24option objc_class_prefix = "GCVN";
25
26// A vertex represents a 2D point in the image.
27// NOTE: the vertex coordinates are in the same scale as the original image.
28message Vertex {
29  // X coordinate.
30  int32 x = 1;
31
32  // Y coordinate.
33  int32 y = 2;
34}
35
36// A vertex represents a 2D point in the image.
37// NOTE: the normalized vertex coordinates are relative to the original image
38// and range from 0 to 1.
39message NormalizedVertex {
40  // X coordinate.
41  float x = 1;
42
43  // Y coordinate.
44  float y = 2;
45}
46
47// A bounding polygon for the detected image annotation.
48message BoundingPoly {
49  // The bounding polygon vertices.
50  repeated Vertex vertices = 1;
51
52  // The bounding polygon normalized vertices.
53  repeated NormalizedVertex normalized_vertices = 2;
54}
55
56// A 3D position in the image, used primarily for Face detection landmarks.
57// A valid Position must have both x and y coordinates.
58// The position coordinates are in the same scale as the original image.
59message Position {
60  // X coordinate.
61  float x = 1;
62
63  // Y coordinate.
64  float y = 2;
65
66  // Z coordinate (or depth).
67  float z = 3;
68}
69