blob: 262163430dd979e9822aedcd0a031fa172083c24 [file] [log] [blame]
Milind Upadhyaye2f40d72022-02-24 13:55:53 -08001include "y2022/vision/calibration.fbs";
2
milind-u92195982022-01-22 20:29:31 -08003namespace y2022.vision;
4
Henry Speisere45e7a22022-02-04 23:17:01 -08005struct Point {
6 x:int (id: 0);
7 y:int (id: 1);
8}
9
10table Blob {
11 points:[Point] (id: 0);
12}
13
14// Statistics for each blob used for filtering
15table BlobStatsFbs {
16 centroid:Point (id: 0);
17 aspect_ratio:double (id: 1);
18 area:double (id: 2);
19 num_points:uint64 (id: 3);
20}
21
22// Information for debugging blob detection
Milind Upadhyay25610d22022-02-07 15:35:26 -080023table BlobResultFbs {
Henry Speisere45e7a22022-02-04 23:17:01 -080024 // Blobs that passed the filtering step
25 filtered_blobs:[Blob] (id: 0);
26 // All detected blobs
27 unfiltered_blobs:[Blob] (id: 1);
28 // Stats on the blobs
29 blob_stats:[BlobStatsFbs] (id: 2);
30 // Average centroid of the filtered blobs
31 centroid:Point (id: 3);
32}
33
milind-u92195982022-01-22 20:29:31 -080034// Contains the information the EKF wants from blobs from a single image.
35table TargetEstimate {
36 // Horizontal distance from the camera to the center of the upper hub
37 distance:double (id: 0);
38 // Angle from the camera to the target (horizontal angle in rad).
39 // Positive means right of center, negative means left.
40 angle_to_target:double (id: 1);
41
Milind Upadhyay25610d22022-02-07 15:35:26 -080042 blob_result:BlobResultFbs (id: 2);
Henry Speisere45e7a22022-02-04 23:17:01 -080043
Milind Upadhyaye2f40d72022-02-24 13:55:53 -080044 // Information about the camera which took this image.
45 camera_calibration:frc971.vision.calibration.CameraCalibration (id: 3);
milind-u92195982022-01-22 20:29:31 -080046}
milind-uf2f59aa2022-01-23 21:06:12 -080047
48root_type TargetEstimate;