mediapipe/mediapipe/calculators/image/opencv_image_encoder_calculator.proto
MediaPipe Team 350fbb2100 Project import generated by Copybara.
GitOrigin-RevId: d073f8e21be2fcc0e503cb97c6695078b6b75310
2021-02-27 03:30:05 -05:00

50 lines
1.4 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";
message OpenCvImageEncoderCalculatorOptions {
extend CalculatorOptions {
optional OpenCvImageEncoderCalculatorOptions ext = 227563646;
}
// Quality of the encoding. An integer between (0, 100].
optional int32 quality = 1;
}
// TODO: Consider renaming it to EncodedImage.
message OpenCvImageEncoderCalculatorResults {
// Pixel data encoded as JPEG.
optional bytes encoded_image = 1;
// Height of the image data under #1 once decoded.
optional int32 height = 2;
// Width of the image data under #1 once decoded.
optional int32 width = 3;
enum ColorSpace {
UNKNOWN = 0;
GRAYSCALE = 1;
RGB = 2;
}
// Color space used.
optional ColorSpace colorspace = 4;
}