geometry.proto 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. syntax = "proto3";
  15. package google.cloud.vision.v1p3beta1;
  16. option cc_enable_arenas = true;
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "GeometryProto";
  20. option java_package = "com.google.cloud.vision.v1p3beta1";
  21. option objc_class_prefix = "GCVN";
  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 3D position in the image, used primarily for Face detection landmarks.
  47. // A valid Position must have both x and y coordinates.
  48. // The position coordinates are in the same scale as the original image.
  49. message Position {
  50. // X coordinate.
  51. float x = 1;
  52. // Y coordinate.
  53. float y = 2;
  54. // Z coordinate (or depth).
  55. float z = 3;
  56. }