milind-u | 9219598 | 2022-01-22 20:29:31 -0800 | [diff] [blame] | 1 | namespace y2022.vision; |
| 2 | |
Henry Speiser | e45e7a2 | 2022-02-04 23:17:01 -0800 | [diff] [blame] | 3 | struct Point { |
| 4 | x:int (id: 0); |
| 5 | y:int (id: 1); |
| 6 | } |
| 7 | |
| 8 | table Blob { |
| 9 | points:[Point] (id: 0); |
| 10 | } |
| 11 | |
| 12 | // Statistics for each blob used for filtering |
| 13 | table 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 |
Milind Upadhyay | 25610d2 | 2022-02-07 15:35:26 -0800 | [diff] [blame] | 21 | table BlobResultFbs { |
Henry Speiser | e45e7a2 | 2022-02-04 23:17:01 -0800 | [diff] [blame] | 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-u | 9219598 | 2022-01-22 20:29:31 -0800 | [diff] [blame] | 32 | // Contains the information the EKF wants from blobs from a single image. |
| 33 | table 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 | |
Milind Upadhyay | 25610d2 | 2022-02-07 15:35:26 -0800 | [diff] [blame] | 40 | blob_result:BlobResultFbs (id: 2); |
Henry Speiser | e45e7a2 | 2022-02-04 23:17:01 -0800 | [diff] [blame] | 41 | |
| 42 | // TODO(milind): add confidence |
milind-u | 9219598 | 2022-01-22 20:29:31 -0800 | [diff] [blame] | 43 | } |
milind-u | f2f59aa | 2022-01-23 21:06:12 -0800 | [diff] [blame] | 44 | |
| 45 | root_type TargetEstimate; |