-
Notifications
You must be signed in to change notification settings - Fork 76
Vision Front End
The vision front end is the first process run in the vision system post-Summer 2015. Its input is a variable size YUV image from the top or bottom camera. Full size input dimentions (as are currently executed on top camera images) are 640 pixels x 480 pixels (where a pixel is a yu or yv 16 bit value), or in bytes, 1280x480. The front end outputs a 16-bit Y image and 8-bit white, green, and orange images. Those four output images comprise the inputs to the remainder of the vision system. The front end is executed entirely in highly parallelized assembly language, but alternative C++ exists for reference and debugging (see man/vision/FrontEnd.cpp and Acquire.s).
The Y image is an image of half the origional dimentions (in pixels!) of the input, comprising of 16 bit values representing the averaged Y values of the image at that point. The values are not in fact averaged but are added, so it may be useful to think of the two least significant bits as being to the right of the decimal point.
The value of each pixel is the sum of four Y values across two rows, such that with the following data as input:
V0 Y0 U0 Y1
V1 Y2 U1 Y3
the Y image would be a single 16 bit pixel with the value:
Y0 + Y1 + Y2 + Y3
The three color images are 8-bit images where each pixel is a value between 0 and 255 representing a color rating for that spot in the image. For example, a pixel in the orange image tells you how orange the system thinks the image is at that spot by calculating from the Y, U and V values and the parameters for defining orange-ness.
See Color Parameters for details on how color spaces in the YUV spectrum are defined within the front end.
Support for a color segmented image (like the one used in the "old" vision system) is included in the assembly and c++ versions of the front end. It currently segfaults but should not be too hard to get working, should you need it. I hope that day never comes.