geometry.proto 1.9 KB

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