blob: 17dc4a4bd5c4ce21542ea231ce0088dd03b03bdc [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.
13 rows:int;
14 // The number of columns in the image.
15 cols:int;
16 // The image data.
Alex Perry5f474f22020-02-01 12:14:24 -080017 data:[ubyte];
Brian Silverman967e5df2020-02-09 16:43:34 -080018 // Timestamp when the frame was captured. This is the end-of-frame timestamp.
Brian Silvermane9259802020-01-26 15:18:30 -080019 monotonic_timestamp_ns:long;
Brian Silvermane9259802020-01-26 15:18:30 -080020}
21
22root_type CameraImage;