Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: chromeos/dbus/proto/media_perception.proto

Issue 2791983004: DBus MediaAnalyticsClient and media_perception pb. (Closed)
Patch Set: Upstart process management Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 syntax = "proto2";
2
3 option optimize_for = LITE_RUNTIME;
4
5 package mri;
6
7 // The output of a Drishti media perception graph. Implicitly tied to the
tbarzic 2017/04/27 20:37:35 is this shared with Chrome OS? If so, third_party/
Luke Sorenson 2017/05/03 23:56:07 This proto is not shared with Chrome OS. It is sha
8 // MediaPerception dictionary defined in Chromium source at
9 // src/extensions/common/api/media_perception_private.idl for the
10 // Chromium mediaPerceptionPrivate API. A duplicate copy of this proto also
11 // exists in Chromium for the mediaPerceptionPrivate API implementation to
12 // deserialize this proto.
13 //
14 // The duplicate copy of this proto lives in Chromium source here:
15 // src/chromeos/media_perception/media_perception.proto
16 // If you change this file, you need to make sure to update this file in the
17 // Chromium source tree as well.
18 //
19 // This message is packaged by the Drishti graph runner when a PerceptionSample
20 // or array of PerceptionSamples comes out of the graph.
21 message MediaPerception {
22 // The timestamp attached when this data originated from the analysis process.
23 optional uint64 timestamp = 1;
24
25 // A single FramePerception message or array of perceptions (if reporting the
26 // results from multiple frames).
27 repeated FramePerception frame_perception = 2;
28 }
29
30 // Used to transmit a history of image frames and their associated annotations.
31 // This is accumulated over time by the Drishti graph runner.
32 message Diagnostics {
33 repeated PerceptionSample perception_sample = 1;
34 }
35
36 message State {
37 enum Status {
38 TIMEOUT = 0; // Unable to reach media analysis process.
39 UNINITIALIZED = 1; // Media analytics process waiting to be started.
40 STARTED = 2; // Analysis process running but not recieving frames.
41 RUNNING = 3; // Analysis process running and injesting frames.
42 SUSPENDED = 4;
43 }
44
45 optional Status status = 1;
46
47 // Device context so that the media analytics process can better select the
48 // right video device to open.
49 optional string device_context = 2;
50 }
51
52 // This is the output of the MediaPerceptionSinkCalculator.
53 message PerceptionSample {
54 optional FramePerception frame_perception = 1;
55 // The image frame data associated with the frame perception.
56 optional RawImageFrame raw_image_frame = 2;
57 }
58
59 // Note: this is a replica of image/content/flow/image/raw_image_data.proto
60 // because this proto needs to be self-contained (to be checked in to Chromium
61 // as well).
62 message RawImageFrame {
63 optional int32 width = 1;
64 optional int32 height = 2;
65 // colorspace is defined in the same way as SimpleImage::ColorSpace.
66 optional int32 colorspace = 3;
67 // By default, 1 channel means Grayscale, 2 channels meangs Grayscale + Alpha,
68 // 3 channels means RGB, and 4 channels means RGBA.
69 optional int32 channels = 4;
70 // The raw pixel data as a string of uint8.
71 // The size of pixel_data is height*width*channels.
72 // Byte order is RGBARGBARGBA.
73 // TODO(lasoren): Replace with compressed image format.
74 optional bytes pixel_data = 5;
75 }
76
77 // The set of computer vision metadata for an image frame.
78 message FramePerception {
79 optional uint64 frame_id = 1;
80
81 optional uint32 frame_width_in_px = 2;
82 optional uint32 frame_height_in_px = 3;
83
84 // The timestamp associated with the frame (when it enters the Drishti
85 // graph).
86 optional uint64 timestamp = 4;
87
88 // The list of entities detected for this frame.
89 repeated Entity entity = 5;
90 }
91
92 message Entity {
93 // A unique id associated with the detected entity, which can be used to track
94 // the entity over time.
95 optional uint32 id = 1;
96
97 enum EntityType {
98 UNSPECIFIED = 0;
99 FACE = 1;
100 PERSON = 2;
101 }
102
103 optional EntityType type = 2;
104
105 // Minimum box, which captures entire detected entity.
106 optional BoundingBox bounding_box = 3;
107
108 // A value for the quality of this detection.
109 optional float confidence = 4;
110 }
111
112 message BoundingBox {
113 // The points that define the corners of a bounding box.
114 optional Point top_left = 1;
115 optional Point bottom_right = 2;
116 // Indicates whether or not these coordinates are normalized to values between
117 // 0 and 1.
118 optional bool normalized = 3 [default = false];
119 }
120
121 message Point {
122 // x represents the horizontal distance from the top left corner of the image
123 // to the point.
124 optional float x = 1;
125 // y represents the vertical distance from the top left corner of the image to
126 // the point.
127 optional float y = 2;
128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698