Files
mediapipe/mediapipe/calculators/util/annotation_overlay_calculator.proto
T
2019-06-16 16:06:57 -07:00

44 lines
1.8 KiB
Protocol Buffer

// Copyright 2019 The MediaPipe Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto2";
package mediapipe;
import "mediapipe/framework/calculator.proto";
import "mediapipe/util/color.proto";
// Options for the AnnotationOverlayCalculator.
message AnnotationOverlayCalculatorOptions {
extend CalculatorOptions {
optional AnnotationOverlayCalculatorOptions ext = 250607623;
}
// The canvas width and height in pixels, and the background color. These
// options are used only if an input stream of ImageFrame isn't provided to
// the renderer calculator. If an input stream of ImageFrame is provided, then
// the calculator renders the annotations on top of the provided image, else a
// canvas is created with the dimensions and background color specified in
// these options and the annotations are rendered on top of this canvas.
optional int32 canvas_width_px = 2 [default = 1920];
optional int32 canvas_height_px = 3 [default = 1080];
optional Color canvas_color = 4;
// Whether text should be rendered upside down. When it's set to false, text
// is rendered normally assuming the underlying image has its origin at the
// top-left corner. Therefore, for images with the origin at the bottom-left
// corner this should be set to true.
optional bool flip_text_vertically = 5 [default = false];
}