blob: 3ba10f031bb39288b4c2ad9c65deb4f13d24c9b0 [file] [log] [blame]
include "y2022/vision/calibration.fbs";
namespace y2022.vision;
struct Point {
x:int (id: 0);
y:int (id: 1);
}
struct Size {
width:int (id: 0);
height:int (id: 1);
}
table Blob {
points:[Point] (id: 0);
}
// Statistics for each blob used for filtering
table BlobStatsFbs {
centroid:Point (id: 0);
size:Size (id: 4);
aspect_ratio:double (id: 1);
area:double (id: 2);
num_points:uint64 (id: 3);
}
// Information for debugging blob detection
table BlobResultFbs {
// Blobs that passed the filtering step
filtered_blobs:[Blob] (id: 0);
// All detected blobs
unfiltered_blobs:[Blob] (id: 1);
// Stats on the blobs
blob_stats:[BlobStatsFbs] (id: 2);
// Stats of filtered blobs
filtered_stats:[BlobStatsFbs] (id: 4);
// Average centroid of the filtered blobs
centroid:Point (id: 3);
}
// Euler angles rotation
struct Rotation {
roll:double (id: 0);
pitch:double (id: 1);
yaw:double (id: 2);
}
// Contains the information the EKF wants from blobs from a single image.
table TargetEstimate {
// Horizontal distance from the camera to the center of the upper hub
distance:double (id: 0);
// Angle from the camera to the target (horizontal angle in rad).
// Positive means left of center, negative means right.
angle_to_target:double (id: 1);
// Polar angle from target to camera (not rotation).
// Currently being frozen at 0
angle_to_camera:double (id: 3);
// Rotation of the camera in the hub's reference frame
rotation_camera_hub:Rotation (id: 4);
// Confidence in the estimate from 0 to 1,
// based on the final deviation between projected points and actual blobs.
// Good estimates currently have confidences of around 0.9 or greater.
confidence:double (id: 7);
blob_result:BlobResultFbs (id: 2);
// Contains the duration between the epoch and the nearest point
// in time from when it was called.
image_monotonic_timestamp_ns:int64 (id: 5);
// Information about the camera which took this image.
camera_calibration:frc971.vision.calibration.CameraCalibration (id: 6);
}
root_type TargetEstimate;