blob: 4a61acac027635ddece07f1c04490e4454d92cc8 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Next MinVersion: 1
module chromeos.media_perception.mojom;
import "mojom/common.mojom";
[Extensible]
enum EntityType {
ENTITY_TYPE_UNKNOWN = 0,
FACE = 1,
PERSON = 2,
MOTION_REGION = 3,
LABELED_REGION = 4,
};
struct Entity {
EntityType type@0;
string? label@1;
// A normalized bounding box which captures the entire detected entity.
NormalizedBoundingBox? bounding_box@2;
// A value for the quality of this detection in the interval [0, 1].
float confidence@3;
// The estimated depth of the entity from the camera.
Distance? depth@4;
};
[Extensible]
enum FramePerceptionType {
FRAME_PERCEPTION_TYPE_UNKNOWN = 0,
FACE_DETECTION = 1,
PERSON_DETECTION = 2,
MOTION_DETECTION = 3,
};
struct FramePerception {
int64 frame_id@0;
// The timestamp associated with the frame (when it is received by the
// analytics process).
int64 timestamp_us@1;
// A list of entities detected in this frame.
array<Entity> entities@2;
// Indicates what types of frame perception were run.
array<FramePerceptionType> perception_types@3;
};
interface FramePerceptionHandler {
// Callback for data that comes out of the analytics process.
OnFramePerception@0(FramePerception frame_perception);
};