geometry.proto 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // Copyright 2020 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. syntax = "proto3";
  15. package google.cloud.documentai.v1beta2;
  16. option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta2";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta2;documentai";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "GeometryProto";
  20. option java_package = "com.google.cloud.documentai.v1beta2";
  21. option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta2";
  22. option ruby_package = "Google::Cloud::DocumentAI::V1beta2";
  23. // A vertex represents a 2D point in the image.
  24. // NOTE: the vertex coordinates are in the same scale as the original image.
  25. message Vertex {
  26. // X coordinate.
  27. int32 x = 1;
  28. // Y coordinate.
  29. int32 y = 2;
  30. }
  31. // A vertex represents a 2D point in the image.
  32. // NOTE: the normalized vertex coordinates are relative to the original image
  33. // and range from 0 to 1.
  34. message NormalizedVertex {
  35. // X coordinate.
  36. float x = 1;
  37. // Y coordinate.
  38. float y = 2;
  39. }
  40. // A bounding polygon for the detected image annotation.
  41. message BoundingPoly {
  42. // The bounding polygon vertices.
  43. repeated Vertex vertices = 1;
  44. // The bounding polygon normalized vertices.
  45. repeated NormalizedVertex normalized_vertices = 2;
  46. }