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