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