A camera intended to measure position has a different job from one intended to make photographs: getting useful coordinates out matters more than producing a pleasing picture. In FPGA Vision on Hackaday.io, creator JLAM set out to extract absolute X–Y coordinates from a two-dimensional Gray code at up to 60 Hz, with the aim of feeding an X–Y control loop. The visible development logs, from June 2014 through January 2015, document camera capture and VGA output—but also the memory limits standing between a visible image and that larger goal.
Getting a picture meant throwing detail away
JLAM identified the FPGA as an Altera Cyclone II EP2C5T144C8N. The camera was an OV7670 module, and VGA provided a way to see what the hardware was doing rather than relying on an LED and a button for debugging.
The July 4, 2014 VGA milestone used counters to generate horizontal and vertical synchronization, along with the intervals around the active picture. Those same counters supplied bits for a test pattern. With one bit each for red, green and blue, the output could display eight colors.
By July 10, JLAM reported camera images stored on the FPGA, reduced to a quarter of their original size and just three bits per pixel to save memory. An initial aspect-ratio error came from fitting the image into a power-of-two-sized memory block. Correcting the proportions left some memory unused.
That leftover space suggested a useful compromise: retain a small overview, then use the spare capacity for a cropped region at full resolution. JLAM proposed this region of interest for pattern identification and finer position tracking. It was a plan, not a demonstrated tracking result, but it gets to the central imaging question: which pixels need to retain their detail?
More color worked; more memory hit a limit
The January 18, 2015 update expanded VGA output to 12-bit RGB—four bits per channel—using three resistor-ladder digital-to-analog converters. Each channel used a four-bit R–2R network with a base resistance of 33 ohms, plus output scaling to keep full brightness within 0.7 V.
The obstacle wasn't just choosing resistor values. JLAM reported that the monitor's DC-level correction caused trouble because the DAC wasn't returning to zero during synchronization signals. Masking the video output during those pulses resolved the problem. A richer set of color values only became useful once the output respected the display's timing and voltage expectations.
This was an output improvement; the log doesn't establish that the entire camera-processing path had moved to 12-bit color. The next proposed step was adding two or three serial memory devices for a circular buffer, followed by a possible Conway's Game of Life test.
Five days later, the January 23 memory update changed the direction. JLAM reported that the easy-to-use SPI memory topped out at 80 Mbit/s and judged that the planned processing would be faster on a computer with webcams. The budget goal remained, but custom hardware had become the intended next step. No completed custom-hardware revision appears in the supplied logs.
Store fewer pixels—or move them faster?
In a February 19, 2015 comment, Rémy B suggested another route: keep only the image data an operation actually needs in the FPGA's embedded RAM. For a 3×3 erosion operation, the commenter gave the example of retaining three image lines rather than a whole frame.
JLAM replied that they would try it. There is no later implementation result here, and that suggestion doesn't establish what buffering the intended Gray-code decoder would require. It does expose an important design choice: faster external memory isn't the only response to a bandwidth problem; some operations can avoid much of that traffic by retaining less data.
JLAM's longer-term ambition was vision feedback for a generic CNC system. The supplied record doesn't demonstrate that control loop or the 60 Hz coordinate-extraction target. For anyone studying the implementation, the project also links FPGAClient and FPGAHost repositories, whose contents aren't covered by these excerpts.
The useful next question is narrower than whether the board can capture a better picture: how much image history does position decoding actually need? That answer would help decide whether to spend the budget on faster memory, preserve only a high-detail region, or process incoming lines without storing a full frame.
Source: FPGA Vision