blob: 207a37a6abe79d20bdfb0a8ad2eeaf26398f469e [file] [log] [blame]
milind-u92195982022-01-22 20:29:31 -08001namespace y2022.vision;
2
Henry Speisere45e7a22022-02-04 23:17:01 -08003struct Point {
4 x:int (id: 0);
5 y:int (id: 1);
6}
7
8table Blob {
9 points:[Point] (id: 0);
10}
11
12// Statistics for each blob used for filtering
13table BlobStatsFbs {
14 centroid:Point (id: 0);
15 aspect_ratio:double (id: 1);
16 area:double (id: 2);
17 num_points:uint64 (id: 3);
18}
19
20// Information for debugging blob detection
21table BlobResult {
22 // Blobs that passed the filtering step
23 filtered_blobs:[Blob] (id: 0);
24 // All detected blobs
25 unfiltered_blobs:[Blob] (id: 1);
26 // Stats on the blobs
27 blob_stats:[BlobStatsFbs] (id: 2);
28 // Average centroid of the filtered blobs
29 centroid:Point (id: 3);
30}
31
milind-u92195982022-01-22 20:29:31 -080032// Contains the information the EKF wants from blobs from a single image.
33table TargetEstimate {
34 // Horizontal distance from the camera to the center of the upper hub
35 distance:double (id: 0);
36 // Angle from the camera to the target (horizontal angle in rad).
37 // Positive means right of center, negative means left.
38 angle_to_target:double (id: 1);
39
Henry Speisere45e7a22022-02-04 23:17:01 -080040 blob_result:BlobResult (id: 2);
41
42 // TODO(milind): add confidence
milind-u92195982022-01-22 20:29:31 -080043}
milind-uf2f59aa2022-01-23 21:06:12 -080044
45root_type TargetEstimate;