geometry.proto 1.8 KB

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