geometry.proto 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright 2018 Google Inc.
  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.vision.v1p3beta1;
  16. import "google/api/annotations.proto";
  17. option cc_enable_arenas = true;
  18. option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "GeometryProto";
  21. option java_package = "com.google.cloud.vision.v1p3beta1";
  22. // A vertex represents a 2D point in the image.
  23. // NOTE: the vertex coordinates are in the same scale as the original image.
  24. message Vertex {
  25. // X coordinate.
  26. int32 x = 1;
  27. // Y coordinate.
  28. int32 y = 2;
  29. }
  30. // A vertex represents a 2D point in the image.
  31. // NOTE: the normalized vertex coordinates are relative to the original image
  32. // and range from 0 to 1.
  33. message NormalizedVertex {
  34. // X coordinate.
  35. float x = 1;
  36. // Y coordinate.
  37. float y = 2;
  38. }
  39. // A bounding polygon for the detected image annotation.
  40. message BoundingPoly {
  41. // The bounding polygon vertices.
  42. repeated Vertex vertices = 1;
  43. // The bounding polygon normalized vertices.
  44. repeated NormalizedVertex normalized_vertices = 2;
  45. }
  46. // A normalized bounding polygon around a portion of an image.
  47. message NormalizedBoundingPoly {
  48. // Normalized vertices of the bounding polygon.
  49. repeated NormalizedVertex vertices = 1;
  50. }
  51. // A 3D position in the image, used primarily for Face detection landmarks.
  52. // A valid Position must have both x and y coordinates.
  53. // The position coordinates are in the same scale as the original image.
  54. message Position {
  55. // X coordinate.
  56. float x = 1;
  57. // Y coordinate.
  58. float y = 2;
  59. // Z coordinate (or depth).
  60. float z = 3;
  61. }