xref: /aosp_15_r20/external/googleapis/google/cloud/documentai/v1beta1/geometry.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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.documentai.v1beta1;
19
20
21option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta1";
22option go_package = "cloud.google.com/go/documentai/apiv1beta1/documentaipb;documentaipb";
23option java_multiple_files = true;
24option java_outer_classname = "GeometryProto";
25option java_package = "com.google.cloud.documentai.v1beta1";
26option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta1";
27option ruby_package = "Google::Cloud::DocumentAI::V1beta1";
28
29// A vertex represents a 2D point in the image.
30// NOTE: the vertex coordinates are in the same scale as the original image.
31message Vertex {
32  // X coordinate.
33  int32 x = 1;
34
35  // Y coordinate.
36  int32 y = 2;
37}
38
39// A vertex represents a 2D point in the image.
40// NOTE: the normalized vertex coordinates are relative to the original image
41// and range from 0 to 1.
42message NormalizedVertex {
43  // X coordinate.
44  float x = 1;
45
46  // Y coordinate.
47  float y = 2;
48}
49
50// A bounding polygon for the detected image annotation.
51message BoundingPoly {
52  // The bounding polygon vertices.
53  repeated Vertex vertices = 1;
54
55  // The bounding polygon normalized vertices.
56  repeated NormalizedVertex normalized_vertices = 2;
57}
58