blob: e89a181eb1d7c4630f7242746c1688a34cc7fb42 [file] [log] [blame]
Brian Silvermane9259802020-01-26 15:18:30 -08001namespace frc971.vision;
2
3// Contains the image data from one frame of a camera.
4//
5// The following image options are hard-coded. If you add images in a different
6// format, make fields for them which default to these values and remove this
7// comment:
8// * Format: YUYV (V4L2_PIX_FMT_YUYV, which puts 2 pixels in every 4 bytes,
9// with the order Y0,U,Y1,V)
10// * Order: row major (index 0 is upper left, index 1 is to its right)
11table CameraImage {
12 // The number of rows in the image.
Austin Schuhd7851b02020-11-14 13:46:27 -080013 rows:int32 (id: 0);
Brian Silvermane9259802020-01-26 15:18:30 -080014 // The number of columns in the image.
Austin Schuhd7851b02020-11-14 13:46:27 -080015 cols:int32 (id: 1);
Brian Silvermane9259802020-01-26 15:18:30 -080016 // The image data.
Austin Schuhd7851b02020-11-14 13:46:27 -080017 data:[ubyte] (id: 2);
Brian Silverman967e5df2020-02-09 16:43:34 -080018 // Timestamp when the frame was captured. This is the end-of-frame timestamp.
Austin Schuhd7851b02020-11-14 13:46:27 -080019 monotonic_timestamp_ns:int64 (id: 3);
Brian Silvermane9259802020-01-26 15:18:30 -080020}
21
22root_type CameraImage;