geometry.proto 2.0 KB

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